Default [Q] Phone restarts when camera started???

Basically if I start the camera app the phone restarts??? What do I need to repair it, can buy a camera off ebay but the gyroscope isn't working either. Is there an easy fix or what do I need to fix it ?