If your new dog has never been in a crate before, then he is probably going to protest if you just cram him in (or trick him by tossing a treat in) and lock the door. He isn't going to understand, and may bark, howl, whine, and dig at the door in an attempt to be let out. You can either ignore him, and know that you will lose several nights' sleep in the process, or you can teach him that being in the crate is a good thing.
The following explains how to desensitize the dog to the crate during the day instead of just locking her in there at night and passing out earplugs to all of your neighbors. You'll need to move the crate into the main living area of your house for this. And you'll need lots of SMALL, yummy treats that she loves. If she likes crunchy treats, those would be ideal because they require a few seconds to eat, as opposed to a soft treat that can just be swallowed (which are preferable for obedience training for that reason). Whatever you use, though, it needs to be something that she absolutely LOVES, so that she will be inclined to go into the crate for it.
All you have to do is to spend just a few minutes with the dog, several times a day, tossing a treat into the open door of the crate, and praising her for going in to get it. Do NOT close the door of the crate yet. Most dogs will willingly enter the crate on command and allow you to close the door in just one day.
When she is launching herself into the crate when you toss a treat in, start putting a command to it. Say the command just before you toss the treat into the crate. Repeat repeat repeat until she will go into the crate when you say the command, before you start to toss the treat in. When she'll do that, then you will stop tossing a treat in, and instead you will give it to her once she goes into the crate after you give the command. Do this several times, praising her as you hand her the treat. Then, you can start practicing closing the door.
When you are to the point where you can say the command, she goes in the crate, and you hand her a treat while she's in the crate, you will start gradually, progressively closing the door. The first several times, you will simply hand her the treat and reach up and touch the door. Then, you will start handing her the treat and shutting the door about 1/4 of the way, and immediately opening it back up again. Don't forget the praise!!! Gradually work towards closing the door all the way (without locking it) and opening it right back up. Then, start pausing once you get the door closed (again, do not actually lock it in place), at first for just a half a second, gradually working your way up to several seconds. When she will sit calmly inside the crate while you hold the door closed for 10 seconds, you can start practicing locking it.
When you start locking the door, you will want to start over again with just a second at first, then gradually working your way back up to 10 seconds. When she's fine with the crate door locked and you sitting in front of the crate, start practicing moving away from the crate once you shut and lock the door. Again, start over with just a couple of seconds at first, which should give you time to stand up, count to 1, and squat back down and open the door again. Gradually increase the amount of time (as she is calm! If she becomes anxious, you've gone too fast and you need to go back a step) until you can close and lock the door, stand up, and count 10 seconds.
Next, you'll actually start moving away from the crate. As before, you'll start out by just taking one step, then returning and letting her out, then two steps, then three, and so on, until you can actually exit the room without her becoming anxious. At first, you will leave the room only for a second before returning, but your goal is to be able to exit the room for 10 seconds before returning.
This sounds like a lot, I know, but as you progress, each step will take less and less time to move through. Don't forget to praise her as long as she is calm in the crate!!
When you put her in the crate at night, it might also help to give her something to keep her occupied for a little while, such as a Kong that you have smeared peanut butter inside and frozen all day, or a Jumbone or Busy Bone. The most important thing to remember is that you must completely ignore her if she starts making a fuss in the crate, and let her out ONLY when she is quiet and calm.