Can all music and playlists/ratings be transferred back from an iPod Touch to a PC? How can I get my songs from my iPod Touch to my PC?

Some of the songs were purchased through iTunes, and others were ripped from CDs.

This is what happened:


The iPod Touch was set up to sync with my PC via iTunes, so my PC had all of the music on it.
The PC got infected with viruses and the computer needed to be formatted.
The music is now only on the iPod Touch and not on the PC.


Is there any way I can get my songs back to the PC from my iPod Touch (or iPad or iPhone since they all run iOS)?
Try SharePod:


  Change 
  Add and remove music, videos, playlists and artwork on your
  iPod.
  
  Backup 
  Backup all those tracks you just can't lose onto your computer.
  Import them automatically into your
  iTunes library.
  
  Share 
  SharePod can run straight from the iPod itself, so you can use
  it at work, school, home - wherever
  you and your iPod are.