put phone into DFU mode and then restore the phone. You do this by holding down home and sleep/wake button until the screen goes blank and then let go of sleep/wake button and carry on holding home button until iTunes tells you it is in recovery mode