You use a pinion depth checking tool to figure what shim goes under the pinion bearing. Usually you will find it's within a thousandth or so of the stock shim and often I reuse the stock one. Then when you install the companion flange (what the drive shaft bolts to) you tighten up the nut slowly while checking with a torque wrench what the torque is to turn the pinion nut which is the pre-load of the pinion and bearings. There is a spec in the manual for a new and used set of gears/bearings. The idea is that the pinion gear is held in tension and won't deflect under driveline torque. Once that is done, the ring gear/carrier/bearings are installed, set for .000" play, and gears checked for proper backlash again a spec for new/used gears/bearings is in the manual. Dye is mixed with some gear oil and applied to the gears and when turned by hand, a pattern shows. Once proper backlash and tooth contact pattern is achieved, .004" shim is added to both sides for a total of .008" pre-load so the setting is not disturbed. Again, this holds the carrier in tension so the pinion gear torque won't move the carrier out of line. Then you double check backlash and tooth contact pattern and if satisfied, button it all up. Very rarely, in fact never, will the old carrier shims work with new gears.