...it's been continuing ever since I bought my new PC...
Since the very first time you turned your computer on, did it start doing this? If so then use a system restore point previous to the date of purchase.
Or did this started happening not long after you bought the machine, but just after the use of a system optimizer or a registry cleaning product, or installed any other application? Pin-pointing when this started could be a great advantage to find the best approach to troubleshoot this, and also save us time.
Are there any USB devices attached to the machine such as printer or memory stick?
Can you actually boot to GUI and work through the OS before it shuts down, or are you incapable of doing so?
Do try the system restore. Also a good idea to see if CHKDSK and SFC /SCANNOW can be of any help here.
Let me know about these details, and how you got on with what you've attempted so far.
Remember to Backup