i have 2 daughters, one is 6 and te other is 8. My 6 year old used to do exactly what you've described, she would get totally out of control if she wanted something and didn't get it.
I am very consistent with my kids and it wasn't a matter of screaming until she got her way...she would just scream hysterically until she simply couldn't scream anymore. The first few times it happened i didn't know how to handle it, trying to comfort her while still standing my ground and not giving in.
the last time she did this was about a year ago and it started with her eating ice cream on the couch which is not allowed. I told her to go to the table and eat and she refused so i took the ice cream away and put it at the table. she started her screaming and refused to move to the table, she would scream so loud i was concerned neighbors may think she was being beaten. i made her go to her room and shut her door where she proceeded to throw things at the door and kick the walls. finally i went in and held her in my lap while she writhed and screamed until she fell asleep (approx an hour and a half from start to finish). and this was a typical fit for her....it was horrible.
there haven't been any significant changes in her life in the past year but that was the last time she had a fit of that magnitude.....it's been a good year
just be patient with your friend's daughter...i know it can be a real pain to spend time with someone who has a child that is out of control. just be glad she doesn't give in, it'll go away on it's own as long as she's consistent.