Help Samsung note i717 keeps shutting its self off!


Hi guys i have a problem with my note 1 it keeps turning its self off for some dam reason and only way to get it back on is to pop out the battery and push it back in. It all started when my gf update the FB app every since that day its did this so first thing i did was i put the new 4.1.2 jelly bean on it and it fixed nothing still did it so then i did a complete system restore back to stock and still fixed nothing so i dont know what it could be and how to fix it. The werid thing is when its on the charge it will stay on all the time it only dose it off the charger so we replaced the battery and fixed nothing and we also figerd out that if its running something it wont do it eather like as long as she has it playing music it will stay on! I havent tried any other apps and what not to see if it will stay on with them running so any u guys every have this problem and if so how did u fix it? The repair shop said it was a entrnal problem and they couldnt fix it