Try this ...
01. Insert the 10.4 'Tiger' Installation DVD.
02. Restart (reboot) the Mac, via the 'restart' button.
03. Press and keep pressed the <option> key during the boot up process.
04. A set of icons representing your boot drive and the DVD will appear. When the mouse cursor eventually switches to an arrow, select the 'DVD' icon, and then click on the right pointing 'arrow' button.
05. After the Mac boots from the DVD, via the 'Utilities' (or equivalent) menu, select 'Disk Utility'.
06. Select your internal boot up hard disk drive's icon.
07. Click on the 'Repair Disk' button. You may have to repeat this step some additional times.
08. Click on the 'Repair Disk Permissions' button. You may have to repeat this step some additional times.
09. When you quit 'Disk Utility', restart (reboot) your Mac.
See if this solves or explains [via the report(s) by the 'Repair Disk' process(es)] your Shut Down and Restart problems.