Hi valleye and welcome,
Shutdown problems are notoriously difficult to diagnose, and it's a slow process.
Some things to try, though:
Check Device Manager to see if there are any problems.
Review the Reliability Monitor (Control Panel > Administrative Tools > Reliability and Performance Monitor > Reliability Monitor and review all incidents (Click on the + sign beside each category).
Review Event Viewer entries (Control Panel > Administrative Tools > Event Viewer, expand Windows Logs and review the System and Application events.
Ensure that your BIOS and all your drivers
are up to date by checking on manufacturers' websites.
Ensure that Windows is up to date through Windows Update.
A common cause of system restarts is the Wake On setting. The Wake On setting allows a computer to be automatically booted if it receives LAN packets intended for it, or if the modem line rings. Typically, the Wake on LAN settings would be adjusted through your computerís BIOS setting. If you have checked the BIOS though and the Wake On LAN setting is disabled, it is possible that Windows might be responsible for waking the system up. To find out, open the Device Manager and locate your systemís network card. Right click on the card and select the Properties command from the resulting shortcut menu. When you do, you will see the network cardís properties sheet. Now, select the Power Management tab and verify that the Allow This Device To Bring The Computer Out Of Standby option is deselected, as shown below:
(excerpted from Troubleshooting Windows Shutdown Problems
Try those for now.