render only the shadows in Cycles
As David already mentioned in the comments, there are plans for this in the future. As for now you will have to go with the compositing method described in various answers here: https://blender.stackexchange.com/search?q=render+only+shadow

The most comprehensible tutorial that I have watched about this topic is this one: https://www.youtube.com/watch?v=k7gKzgvFiGM