Silly mall ninja idea? Yes.
BUT:
There are a couple of peripheral uses I could see for it. When I shoot coyotes, I keep a shotgun in case a close-in shot pops up. IF I had a shotgun bolted to the rifle, it would certainly make the transition easier. I also shoot a LOT of jackrabbits, and I transition between rifle and shotgun frequently. If I had a dedicated .22 upper with a shotgun bolted underneath, it would make that easier as well. For both of these uses, I would want probably at least a 24" barrel, and it would certainly be a front-heavy proposition.
As far as how you do it, it's easier now than ever. Picatinney rail under the rifle, rail on top of the receiver of the shotgun, perhaps fabricate a bracket to connect the barrels around the bayonet lug. The ones I have seen also has the rear of the shotgun receiver squared off to match closer to the magazine of the rifle. I COULD do that myself, but I would probably have a smith do it. Basically, I would look in the pawn shops for an old 870 I wouldn't mind butchering.