To use a foreign PSN code on an American PS3 all you have to do is create a new PSN user account with the country set to the appropriate option for the region in which the code is from. However you will most likely need a game disc that is also coded from that region to use your new downloads.