You should gradually switch. Rabbits do have delicate digestive tracts, so big changes are not good. Some rabbits do better with changes while others need a very gradual change.
If you know what pellets are in the shelter's mix and want to use one of those, then it would be a bit easier than going to a totally different pellet as he would be used to that one.
The general rule is a 25% new and 75% old for the first week, a 50/50 mix the second week and 75% new with 25% old the last week then just the new stuff. If your rabbit does well, or you don't have enough of the old food, then you can go a bit faster.
Keep in mind that rabbits are great manipulators. Since some foods taste better than others, they might only want to eat one kind. You should not give more food until it is all gone. If you normally give pellets twice a day, try only giving them once but give the full amount. This can allow them to eat what they want, but then they have the other stuff until you feed them again.