Could be a permissions issue.
Insert your OSX install dvd and hold option on startup or when it restarts.
You will have the option to boot from HDD or DVD choose DVD.
Once it loads (may take a few minutes) select disk utility.
*You may have to select a language or something.
In disk utility select you HDD and then you can "check disk permissions" and "repair disk permissions".
This may be the reason it keeps restarting when you shut it down.
It also could be a pending install of an update that is corrupt, but this should correct that issue.
If not let us know.
Good Luck!
-Varsity