All you can do is be there to listen to her.
My experiencce as a Samaritan counsellor for three years taught me that the original premise on which the organisation was founded is a sound one -
people do not always want a solution found for them. What they do want is for someone to listen in a non-judgemental and supportive way while they put their thoughts in order by speaking them out loud, and then they can work their way towards their own conclusion.
So as her friend, your role is to listen, and only listen. Phrases like "He doesn't deserve you ..." or "If i were you ..." may be going through your mind, but that is the place for them - not out of your mouth into her ears.
In an ideal world, we would stop our friends from hurting when we can see a solution, and it appears that they can't - but it never has been an ideal world, so we have to work with what we are given - two ears, and just one mouth.