Totally agree on good classes. You don't want a class with a lot of corrections, but rather one that builds confidence through success. Classes have been transformative in several ultra-scared dogs who came to me from rescue as shut-down dogs who wanted to avoid everything and everybody. My old male practiced trying to make himself invisible his first few weeks with us as an adolescent, and he would shriek in fear and splay flat on the ground when he was approached by another dog. He grew up to be a gregarious, sociable, funny guy who believes each human he meets is going to be a new friend, and who loves dog parks and play care!
It took a lot of time, but he went through a "lightbulb moment" in his first obedience class, where you could see his face illuminate when the world suddenly started making sense and he was so proud to know the right thing to do. He thrived on it. It was wonderful for our trust-bond, as he learned he could be around other dogs because I would keep him safe.
I also played a lot of games with him to build confidence (esp. tug, praising him for being brave, and letting him win). When he was small, I even would lie on the ground and put him on my chest and tickle him--the first time I did it, his eyes got big like he couldn't believe I'd let him lie on top of me. That game seemed to mean a lot to him, as he seemed to become a lot braver after that. I wouldn't play that game with a more assertive dog, but with a very timid one who needs confidence-building, I like it.
I also think there is great value in socialization with other stable, sociable dogs -- the fearful ones often eventually learn to model the stable dogs' behavior. My current trainer has a weekly "socialization field" that is all alumni and current clients (dogs he knows, and people who are very involved with their dogs). It's supervised off-leash play time, with a cohort that's more stable than you'd find in a dog park. It's sometimes amazing to see the new dogs who arrive and are terrified go through a transformation over 3-4 weeks--week 1 they want to climb the fence to escape the field, week 2 they are glued to their owner's hip, week 3 they are meekly curious about venturing off a little bit to sniff other dogs, and week 4 they start venturing out to run for the first time with the "pack"). We've seen this process occur over and over at the field, and there's something those stable dogs do to heal the damaged ones that is very important, but it takes time. Some of our most confident, sociable dogs at the field started out as dogs who wanted to climb the fence and run away from the group! It also gets the dogs used to being around lots of different people, all of whom are very sympathetic to a shy dog's recovery.