Do NOT utilize the crate as a punishment tool! It is meant to be a positive item, and by using it any other way could be deterimental to the dog.
If you are expecting people over, put your dog on a leash so that YOU have control over her behavior. You want her to associate people who are coming over with a POSIVITVE thing, and not a negative thing (yelling at her and putting her in a crate). Teach the dog an alternative behavior, such as sit, when you open the door. (The dog already needs to know alternative behaviors before you attempt to utilize them.) If someone else can have her on a leash away from the door, that would be helpful too in the beginning.
One way to start working on this is to set up fake meetings. Get some people together and have them one by one come over and go through the normal routine. Make sure they have yummy high value treats to give to Petie. When they come in the door, just have them ignore Petie, and toss some treats down in her direction (that way there is no hands close to her mouth), and walk inside. You may need to do this over and over until Petie understands that person coming over=YUMMY treats. This may take several days, weeks, and months. You just have to be patient. Once people are in and Petie has calmed down, release her, and THEN they can greet her and she can interact.
Have the people wear different things (long coats, ball hats, sunglasses, etc.) so that Petie gets used to people looking “odd”. Always utilize treats to the best of your ability. If she isn’t food driven, then use a favorite toy. Have these items OUTSIDE the door when people come over so they are already to go.
Each time Petie reacts less, praise and treat her like there is no tomorrow!!! She will then put two and two together. People coming over=treats=praise from my mom. She will eventaully associate people coming over as a positive thing, and that is what you want. You may need to continue doing this for the rest of her life, but you will be able to minimize how often you provide treats. She will perform in anticipation of treats.
By yelling at her and being rough (putting her in the crate), that will only escalate the situation at hand. She will then associate people coming over with you getting angry and she will try even harder to get them to go away, which could then mean biting. This is the scenario you are heading to.
You need to train a dog positively, or you won’t get much out of your dog. Be gentle, patient, and consistent. Those are keys. You need to be relaxed and calm. Dogs can read us better than we will ever be able to read them. If you show tension, Petie will know it, and will react accordingly. Just be as calm as you can and work through the exercises often. There may be set backs, but just know that they can and will occur. You just start back from sqaure one.