From Shopify Wiki
The United States Postal Service is the official mail carrier of the United States of America.
Please note that this does not work for Google Checkout based checkouts.
In order to use USPS shipping rate calculation in Shopify, you will need to sign up for a USPS web tools user ID by filling out this form. Once you have completed the signup process, you will be emailed a user ID which you can then enter in the appropriate field in the USPS settings on your shipping preferences page.
Your account will probably be set to test mode after signup. In this case please email USPS that you would like to take your account to production mode. When you save your USPS user ID in Shopify, we automatically take care of testing that ID with USPS's computers, so you don't have to follow the instructions for testing that are included in the email from USPS.
Under normal circumstances you should then get an error message from Shopify saying that your account is in test mode. Unless the error message says that you have invalid USPS credentials, you can tell USPS that you have completed the testing required for production mode. Once in production mode, Shopify will accept your account credentials without any error messages and your shop will be able to calculate rates with USPS.