How can I get my girlfriend to get help for her ocd?

Encourage her. Encourage her, gently, to seek consultation with a psychiatrist or psychologist. There are good therapies for OCD -- both medications that help this particular form of anxiety, and psychotherapy to help the obsessions & compulsions. You could offer to go with her to the first appointment if she's frightened. Speak from your own heart and loving concerns for her, and not from a blaming position.
Motivation. Sometimes it can seem impossible to motivate someone to get help. However most people have a part of them that's wanting to change and willingly to get help but something is stopping them. Try to find and motivate that part.
Getting help. Getting help for a friend is sometimes very difficult. You may see there is a problem, but she may not see that there is a problem. You can point out issues to your friend and ask that she see a doctor.