this could be a number of things here. i would look at the power supply, as it maybe on its way out and that is why the neccesity to keep restarting. saying that it doesn't explain the slow shutdowns. one thing i would say is never turn the computer off at the switch before it has turned off completely or you will end up with a corrupted drive and it will not boot at all. at this stage the first thing i would be doing is backing up all my important information in case such a thing happens. then i would reformat the drive and put a clean install of the OS and that will probably get rid off the slow shutdown, as it is hard to discover what is holding it up.
before you do anything apart from the backup you need to post the system details.
i would also note what processes you have running as there maybe something there that is slowing the shutdown sequence there. to do this click "cnrl, alt, del" on your keyboard to bring up the task manager where the proceeses can be accessed.
post back all the above info and somebody may give a solution