As far as iPhone goes. It could possibly be the Apple Mobile Device Support? But would not explain why shuffle is doing it. So I am guessing possible bad iTunes preference file?
Have you
1. Tried a new user account to see if the same thing occurs?
2. Tried Shuffle and iPhone on another computer to see if the same thing occurs?
Posted below is the link on how to remove Apple Mobile Device Support. May or may not help in this case but worth trying.
iPhone and iPod touch: How to remove and reinstall the Apple Mobile Device Service on Mac OS X
http://support.apple.com/kb/HT1747?viewlocale=en_US