Thank you for the response! Since the computer shuts down randomly, I would like you to apply all of the troubleshooting steps in this HP document: The Computer Restarts Unexpectedly (Windows 8)
*Please note: This document applies to Windows 8 and 8.1. Also, the troubleshooting does not differ based on whether or not it restarts or shuts down completely.
These troubleshooting steps are designed to resolve the issue. Please do try all the steps, since they could resolve the issue, and let me know the results. Thanks!
Mario