My iMac will not shut down properly either for over a year now. It simply removes the menu and icon bars at top and bottom and simply sits there forever.
I don't have a system "fix" but I do have a solution that works for me as a workaround. I got to the apple menu, select the "Force Quit", force quit each open app that I missed closing before shutting down. I then also select the "Finder" and relaunch it. After that, I select "Shut Down" and do not hit the "Shut down" button on the window that pops up. I simply let it time out to shut itself down. If I hit the shut down button in shut down window it still tends to hang up on shut down. This has worked successfully for me every time since I started having this problem. I have a imac 2013 running Yosemite OS X 10.10.4.