Does it give you an option to cancel the shutdown or does it just shutdown without you being able to use it?
It could be a virus or another form of malware. Try running some antivirus and anti-spyware software on it.
Many forum members would advise these programs: AVG Antivirus Free, AVG Anti-Spyware, Adaware 2007, and Spybot Search & Destroy
http://us.mcafee.com/ also has a free online virus scanner (no removal)
Also, get back to us on the specs of the computer and everything