Transparent Plane with Shadows and Mirror?

I’m working on incorporating CG objects in live action footage and was wondering if there was a way to make a transparent plane except for shadows (I know how to do that) and mirroring (that’s what I don’t know how to do).

Any suggestions?