I'm not a lawyer, up front about that.
So your "friend" was selling her sexual services, which is illegal nearly everywhere, and stands accused of robbing her trick, or customer, who was buying her sexual services, which is also illegal nearly everywhere.
The fact that both parties were engaged in illegal activity does not mean it's also okay for one of them to perform an additional illegal activity such as robbery. Just like it wouldn't be okay if he'd decided to beat her up, or steal her car, right?
If you want to help your friend, find her a criminal attorney, since public defenders tend to have very heavy caseloads and don't have the resources to focus entirely on giving any single client the best possible defense.
If my understanding of US law is correct, by taking the stand to testify, your friend opens herself to cross-examination and cannot refuse to answer prosecutor's questions. Her attorney can advise her properly on whether she should testify.