Go into Settings > iCloud and turn off Find My iPhone.
Connect the iPhone to a PC or Mac running iTunes using a cable connection (not Wi-Fi), and allow the two to connect.
Make a local backup using iTunes before you do anything else by clicking on the Backup Now.
From the iPhone screen in iTunes, hold down Alt (on Mac) and Shift (on Windows) and click on Restore iPhone and point iTunes to the file you downloaded earlier.
Allow the restore to take place and when you iPhone reboots it will be running iOS 8.
Reload your data and apps by clicking on Restore from this backup and allow the process to complete.
Re-enable Find My iPhone.