In my case, I wanted to prepare a clean install without restoring old files and apps, preferring to do a manual rebuild of the iPad to the way I wanted it again. But you should also be able to restore your files and settings using previous setup. Just don't forget to make a full backup in iTunes of your device first.
You can download the required .ipsw (iPhone/Pad/Pod software) file from JustaPenguin, or from numerous other sites.
Do take advantage of the security hashes though — it's within the realms of possibility that taking an operating system file from a party other than Apple may not be secure, and the firmware may have been tampered with to introduct malware or backdoors. With the help of a MD5 or SHA1 security hash, you can check if a file has been tampered.
How to check integrity of iOS firmware
In Apple OS X, use the Terminal.app to verify that the file you've downloaded has not been corrupted by accident or design.
One such way is with SHA1 hash file. After you've downloaded the correct .ipsw file, run the following command:
/usr/bin/openssl sha1 path/to/file
You can type or paste just the '/usr/bin/openssl sha1' part of the command, then drag-and-drop your .ipsw file to the Terminal window to complete the path to the file itself.
Compare the alphanumeric string you see with that published on trusted sites. I looked at a few sources in the hope that consensus would provide some integrity — for example The iPhoneWiki as well as my source download site of Icj.
How to install iOS 6 on an iOS 7 device
Satisified that you have an unadulterated genuine Apple firmware file, the rest is easy.
Plug your iPhone or iPad into your computer by its USB cable. Launch iTunes. Click on the device icon in top-right corner of iTunes.app window.
Hold down Option or Alt key, and click on the button labelled Restore iPhone...
An open file dialog window appears. Navigate to your downloaded .ipsw file, for example in the Downloads folder, and click Open.
Then let iTunes do the rest. You should have an iPad or iPhone restored to iOS 6 after a few tens of minutes.
(If you have Find my iPad or Find my iPhone activated, you will be asked to deactive this first.)
That's it — after the install process you should have your iPhone or iPad back to its iOS version 6 shape.
Sign up for CIO Asia eNewsletters.