Melon We do this at classes I run and also a local training colleague does it too..
We start with a puppy class where we know theres no big boisterous dogs.
Have kiddo at the far end of the room next to a door they can leave through without having to pass the dogs if necessary.
They have a barrier (table on its side usually) to create a little safety zone and they just sit with their parent and watch the puppies who remain ON lead the whole timea nd the whole class knows not to go within a set distance.
It is up to the child (and their parent, depending on age) how near they get and whether they venture out from behind the barrier, to come and meet a pup or touch one and up to them how thats done. Sometimes they may be happy to meet a pup who is being carried and they get to choose (again with guidance from us) which pup they meet.
For children really scared, we may just bring them in at the end of a class when there are only oen or two puppies still in the hall!
This is all done once we are fairly sure they can be in a room with a dog on a lead in it of course, so parents are asked to do the work with photos of dogs and videos of dogs first.
I've seen this work absolute wonders many times and it is lovely to see a child overcome their fear - they don't all decide they adore dogs and thats not our goal (we actually don't want particularly very small children to become magnetized to dogs and want to run up to them, touch or hug them!), but seeing a kid almost rigid with fear in week one being able to relax, chat with mum, play games and talk to us by week 10 is fabulous!