A simple tape measure should do the trick. In general, adult German Shepherds have neck sizes around 18 to 24 inches. There are many factors to consider, but not all shock collars can accommodate them.
Find the thickest part of their neck and when you measure, make sure you leave space for at least 3 fingers to fit in between. The measurement you get there should be the proper one for your dog.