If you are not living or working in USA, you CANNOT have a SSN number. If you are not legally allowed to work in USA, you cannot have a SSN number. You cannot get one sitting in Pakistan.
Anyone who can legally work in United States posses a Social Security Number (SSN). As soon you get an SSN, you can open a bank account and can apply for the credit card. Your credit history start to build up and you wherever you will have to buy anything on credit your credit history will be checked.
There are few visa holders that cannot legally work in United States thus cannot apply for a social security number like B1/B2, F2 (dependent of F1 student), H2 (dependent of H1 work permit).