Hi @ogbest
The laptop is shutting down to protect the CPU from being damaged by the heat.
Can you hear if the fan is operating or feel the hot air coming out of the laptop's exhaust vent?
''If not'' it may be faulty.
''If it is operating,'' perhaps it needs cleaning and also the thermal paste on the CPU (and GPU if applicable) may need refreshing so as to aid in the removal of the heat from the CPU (and GPU if applicable).
Here's the [http://h10032.www1.hp.com/ctg/Manual/c04823617.pdf|maintenance and service guide] for the laptop.
Go to p.79 to view the procedure to remove the fan and heat sink assembly.
This will allow you to replace the fan if it is faulty or to clean it if it is dusty etc.
Also once the heat sink is removed, the thermal paste on the CPU can be replaced with new thermal paste.
If the fan is faulty search online for ''738685-001'' to find fan suppliers that suit you best.
Here's the ifixit [guide|744] guide that may also help.