To see if it's hardware or software, you can always run a Linux live CD, such as Ubuntu:http://www.ubuntu.com/download/ubuntu/download
Download it, and burn it to CD on another system. Then just boot off the CD, generally you hit F12 to access the Boot Menu. If the issue is still present while running off the CD, then it's hardware. If it doesn't shut down after a few minutes, then it's software. The good news is you can use the Ubuntu CD as a way to backup your files.