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 the 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 'control+shift' 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.
Music from iPod to computer (using option 2). This a manual method using "hidden folders" and although it works, it is a little more involved than other methods.
Much easier ways are to use one of the many 3rd party programs that copy music from the iPod to the computer.
One of the most recommended is
Yamipod. This is a free program that transfers music from iPod back to the computer. However, it does not transfer playcounts/ratings etc.
Other free programs are
SharePod,
Floola and
iDump.
iPodRobot is another such program but not free.
If you want to recover just the structure of playlists from the iPod (and not the actual song files themselves), there's
iRepo for Windows. which I understand has this feature along with all the standard features for these programs.
iPodRip also has the feature enabling you to reconstruct playlists.
There is also
CopyTrans. This does preserve ratings/playcounts etc if those are important to you but this program is not free. It also supports video transfer.
More information is contained here.
Copying content from your iPod to your computer - The Definitive Guide.