Often, the reason that XP does not shutdown isn't actually XP related, but down to some miserable little 3rd party program that starts and runs in the background and then for whatever reason, coughs a bit and does not shut itself down cleanly (or even at all) therefore causing Windoze to stop as well
The MS Anti Spyware suite is free and quite good - but it does contain a very useful suite of analysis and start up tools, which would enable you to selectively isolate any rogue proggies and to go from there.
If you are a confident user, then the task manager/processes tab, will let you do much the same thing. A good way of seeing whether we are on the right horse here, is to start in safe mode with minimum drivers and see if XP will then shutdown properly. My guess, is that it will.
Conan