Ruth Ann wants to know the following:
1) How long would her mutism last?
2) Would it be realistic for her to talk to her dog but not to people?
3) Would an upset such as the destruction of a cache of sweets she was hiding for her brother shock her into speaking again?
I did a post here on selective mutism back in May. Difference in that assessment and this one is that Ruth Ann brings up the additional question of what might get a child to talk again.
That's something I wanted to tackle so all you writers out there can know the answer as well!

One of the things I found out when doing my research is that most children with selective mutism (SM) actually don't experience trauma as described above. That's not to say that children can't develop SM after a trauma (because they can, it's called traumatic mutism), but that's become something of a stereotype in fiction, I'm afraid.
But you're in a unique position with your character, Ruth Ann, because (1) you've got her at the perfect age to develop this disorder and (2) you can go back and quickly add in some of the other common precipitating traits found in children with SM (found at this website), such as:
1) You could give her relationship with her mother one that was overprotective. Perhaps her mother (who dies) was prone to anxiety or depression. There is a high correlation of children developing SM who have a mother like this.
2) You could write in a familial history of developmental delays or speech and language disorders in this little girls' family. There is more of a chance that a child already slightly behind in language will develop SM upon the age of entering school....which is definitely an anxiety factor, as well.
3) If the girl had an anxious temperance, like being shy, worried, socially avoidant, fearful, withdrawal socially, and clingy, then this would also be in line with developing SM.
4) Give a first degree relative a history of social phobia (like her bio mom or dad). The statistic I found was that 70% of children with SM have a first degree relative with a history of a social phobia and 30% have a first degree relative with a history of SM.
5) Over 90% of children with SM also meet the criteria for social ph

Some other things to think about: SM children generally still feel comfortable talking at home. But since this little girl's home life hot majorly overhauled, I can see how she might not feel comfortable talking there. SM children have been known to talk to a sibling at home but not talk to them at school. Generally SM is confined to school or social settings. I can also see how it might be realistic for the girl to talk to her dog, which in her case would be all the comforting loved one she has left. However, it would be highly unlikely for her to talk to this dog in front of other people. (Maybe you can have her foster mother overhear her? You can work that out.)
As for how long she would stay mute....DSM says anywhere from a few months to a few years. Symptoms can usually resolve on their own without treatment in a few weeks or months. There are medications that can help (in particular Fluoxetine).
I looked for some precedent for a child beginning to speak after being selectively mute that might match the scenario you've got in your head, but I couldn't find one. I suppose you can take artistic license and have her speak when the sweets are destroyed. She'll speak when she's good and ready and when she feels comfortable doing so. Perhaps she gets so fired up about the candy that it sparks her to speak or yell or something. I mean, most children with SM do reach full speech recovery. They had to speak some time about something at some point! Maybe that will be encouraging to you. :) Sorry I couldn't find more that might help out on this point.
Thanks for writing in, Ruth Ann. Hope this helps!