Here's a close-up shot showing how the shim forces the base of the rail up and snug against the underside of the tie plates.