This is pretty straight forward, but different from how other render engines and 3d packages do it so I’m gonna post a quick how to. First select for example the object that is receiving the shadow/s and then go to it’s object properties tab(orange box). Next go to the visibility drop down section and click “Shadow Catcher”. Wapah! Just like that your ground plane will be catching shadows. Now if you have the primary visibility turned off on you objects on top of your ground plane you will notice where they contact the ground plane there will be extremely dark patches/shadows. This is usually fine since you would be layering your objects back on top. However for example if when you layer them back on top and you want them to be semi-transparent/holographic/ghost like you most likely won’t want those patches to be visible. To eliminate these make you top level objects into hold outs. To do this, simply go to the same visibility drop down section of their object properties where you find the shadow catcher option. Right below it is a “Holdout” option. Click that. And that’s it. Done.
*Note: I don’t believe the “Hold out” option is available in 2.79 and earlier in the object properties. You might have to apply a hold out shader to the top level object alternatively. Like the versions of Renderman prior to 21.