DTS, this is exactly the problem I've had with Liesl. Great dog in every way except very suspicious of a stranger approaching her in a friendly manner, looking her in the eye, and bending down to pet her. Since we got her at 4 months she would look them in the eye briefly, tail tucked, not be aggressive at all, but immediately run away (to the end of my leash then around behind my legs).
I respectfully disagree with those who say the solution is to tell everyone that your dog is shy and not to pet it. You certainly have to do this to protect your dog from scary stimulus that worsens the problem. However, kind dog-savvy strangers are your best friend in this circumstance, and most will gladly help you by approaching her correctly, or ignoring her if need be, and dropping a few treats for her as you converse pleasantly with the stranger.
You need to take your dog out every day, twice a day, to be around people. Walk her through light crowds that she is comfortable with, only for a small amount of time so she doesn't get exhausted from the stressful stimulus, and bring treats to encourage her immediately every single time she voluntarily looks at a stranger. She will quickly realize that looking at them is the method to bust open the treat dispenser, and will begin to seek out at least a short contact with strangers, even if only a glance.
From there you build--longer contacts, thicker crowds, longer walks, slower walks, etc.
The very best desensitization for such a dog is to go to a sparsely populated playground with a variety of ages of children. Your dog will not feel trapped since there is much open space. She will be interested in looking at all the activity from afar. She will enjoy you tossing a ball or playing tug with her so she relaxes. Inevitably, children will approach, one or in groups, wanting to pet your dog. You need to effusively praise the child and the dog--give the dog the sense that this is a GREAT event, the approach of this person, and treat the dog and if it will take it have the child treat the dog. Many times the dog will avoid this, but if you persist, the dog will get the idea, and begin to accept and enjoy these events.
If your dog likes to chase a ball, ask the child to throw it, and send the dog for it. The dog is not stupid--it will understand that the child is participating in the fun activity, and will begin to accept that children/strangers can be fun.
The problem of a shy dog is a huge block of ice, and you have to chip away at it daily. But it can be done! As your dog matures, and gains confidence, your progress accelerates, and you can find that you have a dog who greets people with a wagging tail and confidence!
Please don't crawl into a hole with your dog--life with friendly strangers and friends is too much fun for that! Work on this and you will never be sorry you did!