After connecting your iPhone to the computer and its icon appears in iTunes, you can choose Transfer Purchases from iPhone from the File menu.
Or you can right-click (Windows or Mac) or Control-click (Mac only) your iPhone in the iTunes Source list, then choose Transfer Purchases from the shortcut menu that appears.
Please note that this feature only works for items that were purchased on the iTunes Store.
http://www.iphone-mac.com/transfer-iphone-music-to-computer.html
Hope that helps you out.