A shotgun is a long-barrelled metal weapon that shoots out shot, or a lot of small metal bullets, when the trigger is pulled. It is designed to be fired from the shoulder, and the shot is stored in a solid projectile or slug, which disintegrates, setting the shot free to do its damage.
A .22 rifle, although also featuring a long barrel, shoots out a single bullet, and allows for a more direct aim and shot. It is also designed to be fired from the shoulder, but its barrel has a pattern of grooves cut into the barrel walls. The grooves contribute to angular momentum, which improves accuracy and range.