To build a .12 gauge shotgun out of $20 of stuff from any hardware store , you'd get a piece of 1 inch diameter pipe thats 1 foot long and threaded on one side , you'd add a 1 inch end cap that has a nail or screw driven through the exact center of it ,,, this is your firing pin and receiver.
Next take a 3 foot long piece of 3/4 inch diameter pipe and sand down the outside of it one foot up so that it can slide freely in and out of the 1 inch pipe, this is your chamber and barrel.
Take a .12 gauge shotgun shell and slide it into the 3/4 inch pipe , slide that pipe into the receiver and hold it about 1 inch out until you are ready to fire , slide the pipe backwards to fire.
At this point you can buy ".12 gauge chamber reducers" which is a steel sleeve that fits inside the 3/4 inch pipe to turn it into a .357 mag or 9mm or something.
To stay legal your barrel must be in excess of 18 inches and the overall length must be in excess of 26 inches.