Firstly she wanted you there to pad her ego
Secondly she thought you should be grateful to be there to pad her ego
Next time. Have the confidence to walk away if it isn't working. I stopped working with a photographer I had done a lot with as I felt he was getting sleazy with models posing etc..
If someone was criticising me like that I would have invented an emergency and left. You weren't being paid so she should have been more greatful!
Regardless of your skill level you don't deserve to be treated like that.
I have also refused to continue to work on a paid shoot as I felt that what they were asking was going to be bad and I didn't want my reputation on it. It did end up bad and I was glad my name wasn't on it.
I would explain to her (in person or an email) that you were offended and give her a chance to apologise. If she doesn't, depending on how close you are and the value of your friendship, I would cut her loose.
I wouldn't let a paying client talk to me like that let alone a friend.