Your caring means a great deal. The struggle your girlfriend has to attach to you and others is, unfortunately, often a result of the kinds of problems she experienced with her brother.
Perhaps the best thing you can do as a friend is to help her validate her struggle, while at the same time letting you know you are there for her as a friend.
I usually recommend people who are having attachment issues to enter into group therapy. Group therapy allows the issues from the past to emerge in a supportive environment with people who understand the struggle and difficulty to connect. One of the roles you may play in helping her is to help her find a group that she can experiment with. The find help tab at the top of the page can help you locate therapists in your area and here is an organization that has group therapists that can point you in the right direction.
Finally you don’t want this to become your mission rather than hers. This is something she needs to do with support from you — in fact, showing her this article may be a way of helping her begin to help herself.