Using the shadow catcher in cycles does that. But I have found no way to bake the effect. I can certainly render it out from the perspective of the camera. But what I need is to bake it so I can have a shadow on a transparent plane. So I can have a shadow on a transparent texture for the plane obj.
Hello.
In Bake options there’s a Bake Type: Shadow.
It should give you a black and white image that you can now plug into Alpha socket. [Note: it is inverted]
I think Blender doesn’t bake transparency straight into Alpha channel (not exactly sure about that), but you can create a new RGBA image and set Alpha in the Compositor or an external editor.