Pc shutting off is either caused by your components overheating or your power supply being faulty. First step would be to open your PC and clean out all the dust.