A girl and her gun actually asked a very good question, Rifle vs. Shotgun, what’s the difference? I’m going to approach this from the point of view of what defines each and then close with the differences. I’m going to avoid the odd exceptions because it’s not really relevant for the question and just aids confusion.
A rifle principally is a shoulder arm with a barrel length longer than what you would find in a pistol.
Modern rifles use a metallic cartridge similar to a pistol but with some differences that are not relevant to this discussion. This question is a box of worms with a million tangents that you can run off with. Suffice it to say a modern rifles ammunition with have a much higher muzzle velocity than a pistol. It is worth noting you can get rifles in pistol calibers and you can get pistols in rifle calibers, but for the average condition they’re different.
The barrel is cut with rifling. This rifling causes the bullet to spin while going down range. We won’t go into why now, but there’s lands and groves with a twist that spin the bullet.
The longer barrel, ammunition, rifling, and the shoulder stock increase its accuracy. Especially at long range.
Bruce it taking out 3 inch boxes at 675 yards above.
So what about shotguns?
They too are normally shoulder fired, with a barrel much longer than a pistol.
However unlike the rifle, the shotgun has a smooth bore.
The ammunition type is much different as well. The muzzle velocities are lower than rifle rounds, however the the energy is higher because the overall projectile weight is heavier.
3 12-gauge slugs with a .223 hollow point.
Shotgun ammunition comes in a variety of types that can exploit the smooth bore. Most commonly for home defense you hear about 00-buck shot.
This has the benefit of putting multiple projectiles out the barrel at once. The objective is to increase the overall trauma and decrease the requirement on fine accuracy. Instead of a single pin prick of a hit, you have a pattern which grows in size with distance. A shotgun can be accurate, however they are no where near as accurate as a rifle.
So the two big differences between a rifle and shotgun is the bore of the weapon, smooth or rifled, and the rifle shoots a single projectile at once while the shotgun can fire multiple projectiles in a single round.
A side note: Often people claim that a shotgun is better for home defense due to less of a chance of over penetration. Thing is, no matter what, with the exception of bird shot, that bullet is probably going to keep going unless it hits a stud.