Catching cast shadows is pretty easy if there’s a lamp or mesh light lighting the scene. But it’s apparently more difficult if the scene is lit entirely by IBL. I can catch the AO pass, but using the Shadow output on the Render Layer node just results in a solid black plane.
So I came up with a simple, if crude, cheat. Use the Image output from the ground plane and send it through a Hue/Saturation/Value. Set saturation to zero, turning the image to grayscale. Then turn up the Value all the way to 2.0 to lighten plane. Then send this through a Color Balance node and turn up the Gain slider to lighten the plane even more until it’s white, or nearly so. You may need to turn down the Gamma a bit to darken the shadows.
Then just use Mix:Multiply to merge the shadows with the background. I don’t know how well this will work with a complex scene, but for a simple ground plane it works pretty well.
The balls are by dzerbs and were downloaded from BlendSwap.