Thanks for the plug Oli 🙂 I do have to make one correction, though: the bourrelet is at the front of the shell and is carefully machined to fit inside the bore. The bit that takes the rifling is the driving band (or, more logically, rotating band in American) at the back, which is made of a softer material (usually copper, but soft steel in some cannon and plastic in one) which both seals the bore and is spun by the rifling.
Some early large-calibre muzzle-loading rifled cannon did have studs in the shell bodies which were lined up with the grooves as the shells were loaded. On a present-day fired shell, the driving band has grooves but that’s the result of the shell being fired – they weren’t there at the start.
There is indeed a risk that the violence of firing will ‘strip’ the driving band so it is no longer gripped by the rifling. This is why some ammo uses steel bands. Some guns also have progressive rifling, which starts out parallel with the bore but then twists at a gradually increasing rate, to spin the shell up more slowly.
Tony Williams: Military gun and ammunition website and discussion forum