If the iPhone and iPod connect and are recognized by iTunes, using the same USB port, there may be a defect in the shuffle (or possibly the USB cable that came with it).
Be sure to do this to Reset the shuffle
http://support.apple.com/kb/HT1655
If you are using a USB hub (or the spare keyboard port), and it works with the iPhone and iPod, it should work with the shuffle, but try it with a direct connection to USB port on iMac. You should also try shutting down, disconnecting all USB peripherals (except for standard keyboard and mouse), starting up, then run iTunes and connect the shuffle to a direct port.
If that does not help, run Disk Utility and System Profiler. Is the shuffle recognized in either of those utilities when connected?
Note: Your profile info says you use Mac OS X 10.5.1. Is that up-to-date info? I ask, because the tech specs for the current 4G shuffle
http://www.apple.com/ipodshuffle/specs.html
says 10.5.8 or later is required.
If nothing has worked, you should make a reservation at the Genius Bar, if there is a conveniently located Apple Store. Or, use the Contact Us link at the bottom right corner of this web page to contact Apple tech support; you can use phone tech support during the first 90 days after purchase.