I know just how she feels. I was a shy kid, especially in late elementary school (I skipped third grade so I was kind of starting over socially my fourth grade year, and it wasn't all moonbeams and penny whistles, let me tell you). Going up to a kid or two or four and asking to join them is terrifying. What if they say no or ignore you? The prospect of that potential rejection and humiliation can make the whole effort not even worth it. Then seeing everyone else pair up at recess or free choice time is a lonely feeling.
I've told her to be patient. I know she is a wonderful person, intelligent and caring and sensitive and intensely loyal, a person worth knowing and being friends with. I told her that the people around her know that, too. I've told her she can try to be brave and go up to ask someone to play with her, but that it's okay to feel nervous about it because there is nothing wrong with you for being shy. It just means you have to work a little harder (or a lot harder) to make friends.
We do have a play date scheduled with one of the kids in her class after school tomorrow. Doing things like that more often should help, I hope.
What I have not told her is to "be more outgoing" or "don't be so shy" or any of the things people told me when I was a kid. That sort of advice is worthless and succeeds only in making a person feel like being introverted and shy (two separate qualities, though they often go together) are character flaws that must be corrected. It took me years, years, to accept that 1) I am an introvert and 2) that is not a bad thing. Once I truly accepted that about myself (and I was well into my 20s before I did), I shed some of that shyness and stopped worrying about trying to be bubbly and extroverted. I was never good at faking that in the first place. For the record, my parents are both introverts and knew better than to give me advice like "be more outgoing"; it was everyone else who seemed to think that was something about me that needed fixing.
To tell the truth, I'm not entirely comfortable writing about this here. It's something very personal about my daughter and it feels like a breach of privacy revealing this about her on a public blog. This is something she will have to figure out how to work through herself (with our support, obviously). But as someone who went through some serious bouts of shyness, I do feel it's important to point out how difficult that can be, like a public service announcement. Being shy can make various social situations feel anywhere from slightly awkward to completely paralyzing. We could all benefit from being a little more understanding about that.