So, as usual use a plane with Matte/Shadow/Reflection material. To make it invisible use Environment background Switcher map on it's Camera Mapped background slot and on Environment slot of a scene, for example I had an HDRI map and gray background. Gray background is generated with Composite map, though the colour of the back can be set to any colour, read on to know why.

Do not forget to enable Process background and environment map in Exposure Control to avoid black plane (due to difference in exposure control).