If your system freezes at shutdown, you might want to consider a spyware & virus sweep. Then be sure to check the Windows Update site, check in the non-high priority updates to see if there's any shutdown related fixes.

It can also be caused by an OS installation that's going south a little bit at a time.

But rather than pulling the plug, just hold in the power button for about 5 seconds. That should cause the power supply to shut off, which is a little better than pulling the cable out.