The United States was the only country to use shotguns in World War One in a substantial way. It was not the first time the US had used such guns either; shotguns were used in the Philippines against the Moros and on the Mexican Punitive Expedition. For use in the Great War, however, it was deemed necessary to fit bayonets to them. At the request of the War Department, the Winchester company designed a bayonet mounting adapter for their Model 1897 pump-action shotgun, to use the M1917 bayonet that Winchester was also making at the time for the war effort.
Guns were first deployed to France in June 1918 for field testing, used with 9-pellet 00 buckshot in paper hulled cartridges. The reactions from troops in the field varied widely. Those who tended to be in relatively dry conditions with close-range combat tended to like them. Those in particularly wet areas had problems with the paper shells swelling, and those engaged in more open combat at range had little use for them. They were primarily used for military police roles like guarding POWs, but some did see combat.
The US military actually used Winchester 1897s in three different configurations. Guns like this one with bayonet mounts and heat shields, “riot” types with short (20″) plain barrels, and long-barreled models used for training aircraft and anti-aircraft gunners. Numbers are conflicting and sources are complex, but the best assessment appears to be that approximately 12,000 trench models and about 18,000 riot models were sent to the Army (note that in the video I said 18,000 riot and training – that should have been just riot).