If you selected pipe or tubing rated for the pressure of the shotshell(which isn’t that great)you easily buid a gun that wouldn’t blow up. There are also some very interesting things you make out of pipe and 12 guage rounds for the enemy to step on, based on the same principle. They will ruin or remove a foot...
You are correct, there are plenty of off the shelf pipe that is entirely suitable for making a gun. I would always recommend that it be seamless pipe from a pipe supply house as most of the pipe you buy in a hardware store is rolled pipe [with a welded seam].
Very familiar with those items... :^)
Industry maximum recommended specs for run-of-the mill 2 3/4” and 3” 12 gauge shotgun shells is 11,500 PSI. Magnum loads can go to 14,000 PSI. .22 Long Rifle is 24,000 PSI.
Quality schedule 40 steel pipe is good for a working pressure of 2000 psi, rated burst at 12900 in 3/4 inch that would be needed for a standard 12 gauge. That would be shaky with 12 ga loads that normally run to 12000 on the very high end, even with the sloppy fit between the “barrel” and “receiver”.
Cheap hardware store water pipe is a crap-shoot.
I’ve seen those set up for a .30-06 round.