Most likely, the shutdown is related to either:
- components in the computer overheating
- an unstable power supply

Does it shut down when you are running any programs that use a lot of computing power? Or is it completely random?