If you are being asked to restore the iPhone. your data is already gone.
If you have been using the iPhone as intended, your contacts and
pictures should already be sycned with your computer. Depending on
your location, you should be able to download your past iTunes
purchases (except for items no longer available in iTunes). Text
messages are gone, unless you can get them from your wireless provider.
The way to proceed is to connect your iPhone to the computer you usually
sync with and restore the iPhone. Then use iTunes to put back your
contacts, pictures, music, etc. Finally, turn on and use iCloud and start
a good backup regime to prevent future loss.