Ok for your first question...
No you werent justified in using "Faul Language"yes you should of done something different, 1.Tell your manager of her shouting, (shouting to ''Me" is more distracting then cussing and would cause a more "Uncomfortable" working enviroment...)
Say that she caused you to become uncomfortable in your work enviroment which then lead to you cussing which in no doubt you were mistaken to do but the she was very very Iresponsible (Spelling) and that she was not paying full attention to you which is obvios by her talking to her friend.
Now, your manager can say what ever She/He thinks of you to the person hiring you but the person hiring you should get your side of the argument only to be fair.
Well that 'Lil book of 'How we can fire you' basicly says that if you say, "Exuse me misses" we can fire you. Or if you sneeze which is kind of dumb.
My point of view, no i've never had a job but listen to my dad when he got fired at this horrible place. Which we tryed to sue but then cause of the 'Lil book,laws in florida,we couldnt.
Good Luck, and i suggest you call up that manager and tell him/her that you were offended by the clerks shouting which lead to you using foul language.

Just my Opinion.