You're going to have to put it into recovery mode and restore iOS, then set it up as a new device. Do NOT restore your backup. The backup contains the restriction settings.
If you have been syncing your contacts with a cloud service or compatible contact manager, you can sync them back. Extract the photos from the phone to your computer before you wipe it.