You can restore the phone to factory issue using the restore command from iTunes. However, if the phone has the 'Find My iPhone' app turned on, you will not be able to do anything with it until that app is turned off.
Here's how: Restore your iPhone, iPad, or iPod to factory settings - Apple Support