If it's flanged then the flange sticking out is fine. Otherwise, if the shim is longer than the stem you'll have to cut it down, get another, or maybe use a 1 1/8" spacer to take up the extra shim length.
If the stem is the last thing on the stack then a 1 1/8 stem might need a 1 1/8 top cap or else put a 1" spacer above the stem then the 1" top cap. The spacer or top cap should push down directly on the stem, not the shim.
If the stem is rotating on the steerer tube after the clamp bolts are tightened, then you've got the wrong shim (which would be strange). You might be able to bring it back and exchange it but for what I'm not sure, maybe a different brand shim, your best luck may just be to bite the bullet and let a shop worry about it.
I'll never understand why they make bikes with threadless 1" headsets. If it's going to be threadless why not just go to 1 1/8".