Hi,
Shutdown are usually overheating, bad PSU/ mobo or also virus .
First open the box and remove the dust.
Download HWmonitor to check you temps.
If it still shutdown try in safe mode and scan for virus with adwcleaner end roguekliller to rule out malware.
About the PSU you need to test with a known working PSU.
What your computer.