From their definition, the only difference between a rifle and a shotgun is that the first one has a spiraled barrel and the second a smoothbore, the two being shoulder weapons. The proper translation in French should then be:
- Rifle = carabine
- Shotgun = fusil (de chasse)
To be honest, I doubt 0.1% of the population would be able to tell the actual difference between carabine and fusil (I did not know and I will forget very soon, to be honest).
Also, in the military, shoulder weapons are usually called "fusil": fusil d'assaut (assault rifle, generic term for war guns), fusil sniper (sniper gun), fusil (semi-)automatique (semi-automatic rifle/machine gun) (1)
Fusil is usually used in informal talks as carabine is often associated with "carabine à plomb" (pellet gun) nowadays. However, it is rather common to see the word carabine in news titles like "un homme tué par une carabine" (a man killed with a rifle/shotgun), but it can be either a rifle or a shotgun.
More on guns
You have not asked but I will answer anyway:
- Arme à feu = firearm
- Arme de poing ("fist weapon") = handgun, i.e. firearms which are not shoulder weapons
- Chevrotine = buckshot
(1) For years, French military was equipped with semi-automatic rifles called FAMAS (Fusil d'Assaut de la Manufacture d'Armes de St-Etienne) which is being replaced with HK 416 F