It's simple. Assign shadow catcher material to plane that receive shadow, set alpha mode to "for compositing", assign ray switcher material to object that should cast shadow, unplug material from all slots but global illumination and you're good to go.