Hi,
Please do try these troubleshooting steps that may help in solving the issue.
- Start by doing a hard boot, remove the battery and unplug the AC adapter then press and hold the power button for 20 seconds then try booting it up again.
- If it will not work reseat the RAM's, remove them all for couple of seconds then put them back in making sure everything is seated properly.
- Next to try is to remove the battery off the laptop then try booting it up with just the AC adapter connected.
- If it will still shut down by itself do try a different AC adapter then see if the same problem will persist or not.
- If the same problem will persist you'll need to open the laptop again and make sure that everything is seated properly and while the laptop is open do also apply new thermal paste on the CPU.