Render object with only shadow
You can't do this directly in the 3D scene as far as I know. You are probably looking for a "Shadow Catcher" type of material, but this is currently not supported in Blender Cycles yet. There are plans to add it in the future but nothing that works currently.

The only way I know to achieve this currently, is in post production through compositing, using the image you show as a mask to mix it over another image in the Blender Compositor
Use it as an inverted mask where dark areas are more opaque as opposed to white areas being more transparent as shown bellow.