I have an A665-5184x that was having same issue with random shutdowns. If computer stays on long enough perform the following :
Go into power settings and click on "choose what pushing power button does..."
Set every selection to "do nothing"
Save changes....