DS became selectively mute in his second year at school due to it being ... not a nice place to be. He did not have social phobia but had become extremely anxious - to the point of being assessed by an Ed Psych- and was showing many characteristics of ASD. I removed him to HE temporarily, as we were moving anyway and it seemed the best hope of 'mending' him before perhaps re-trying school in our new home.
HE was great. He loved it academically, he became 'himself' again when at home. He couldn't handle HE groups at all - too chaotic for him, he requires order and predictability. However we did have some smaller meet-ups with individual HE families locally and while he did not form friendships he did play happily (non-verbally) alongside the other children, particularly if they were older. He continued attending football club, swimming lessons and Cubs - lots of structured and organised action, very little speech.
After we moved, after several months of HE, DS entered a new school. He was by that time speaking more normally in the company of trusted adults but I genuinely expected him to stop again on re-entering school, though i did think that my HE 'mending' had hugely improved atters.
First day, he came flying out, grin all over his face, talking 19 to the dozen 'they do joined handwriting ALL THE TIME and they have THREE BREAKS and I'm in the best maths group and the boys are called x,y,and z and there are 12 boys and they are ALL MY FRIENDS'. Never looked back.
Several years on, I mentioned in the hearing of one of his friends that he didn't speak for a while 'What, 5 minutes?' 'No, about 6 months'. Friend literally couldn't stop laughing, thought that was the most ridiculous thing he had ever heard 'But he talks ALL THE TIME'.
A long way of saying - try HE, engineer quiet playdates, don't worry too much about the social side because it will become easier as your daughter is scared for less of every day, think of some 'non-verbal' group activities - sport is good, dance might be another option - where she could be involved but not have to speak. Don't view it as permanent, think of it as 'mending' your DD and getting her to a less anxious place and then you can plan for the next steps.