Be very careful when connecting an iPod full of music to an empty iTunes library.There is very real risk of permanently losing all the music.
To prevent auto sync,
before you connect the iPod go to iTunes/preferences and select "devices", then select "disable automatic syncing for iPhones and iPods".
An alternative method is to connect the iPod whilst holding down the 'Command + Option' keys and
do not let them go until your iPod appears in iTunes.
If you see a message that your iPod is associated with a different library and asks if you want to link to a new one, make sure you press
"Cancel".
If you should click on "Erase and Sync" will erase all the content currently on your iPod and it will be replaced with the content of the iTunes library you just connected to.
When you've pressed cancel your iPod should appear in the iTunes source list under "devices" and allow you to change the update setting to
manage the iPod content manually, and that will let you use your iPod for the time being without the risk of accidentally erasing the contents.
Then do any of the following to transfer your music from iPod back to the computer/iTunes.
For iTunes version 7 or later, then you can transfer purchased iTunes store music from the iPod to an authorized computer by using the "file/transfer purchases from iPod" menu. Note that the maximum of 5 authorized computers applies here.
Find out how to do that here.
How to copy iTunes purchases from an iPod or iPhone to a computer.
For all other non purchased content (your own CDs etc), check out the instructions/suggestions here.
Try
iPodDisk. This is a program designed to transfer music from iPod to computer.
Similar programs are
Expod,
Yamipod,
Senuti and
Music Rescue.
If you want to retrieve playlists,
iPodRip has the feature enabling you to reconstruct them.
If you copied photos to your iPod using the full resolution option, enable disk use, open your iPod in "my computer" in Windows or Finder on a Mac, open the photos folder then open the "full resolution" folder and drag the photos out of that folder to your desktop. For enabling disk use look here.
Disk Use.
If you only copied the photos as thumbnails, you can't do this so you'll need a program such as this one.
iPod Photo Copy. (Windows only)
iPod Photo Liberator. (both Mac and Windows versions available)
Photos as thumbnails won't be of the original quality when copied back to your computer.