If it’s loaded with buckshot? Yes and no.
When you’re trying to match a bullet to a gun, usually you’re looking at the pattern of striations (scratches) on the bullet itself. This is caused by the bullet moving through the barrel and scraping across the rifling. This is what gets the bullet spinning, and keeps it from tumbling in the air, but it also leaves a distinctive pattern on the bullet itself.
Keep in mind, lead is a very soft metal, so firing into a concrete wall, or even just pulling it out of the victim with surgical tools will destroy some of those markings.
With a shotgun, the shot itself won’t have striations that you can tie back to a specific weapon, but the spent shells can still be forensically useful in identifying a weapon.
Spend shell casings pick up scraping and indentations from the firearm that they’re fed through. The firing pin will leave an indentation in the back of the shell casing. The breach block (which seals the battery/chamber when firing) will impress on the shell when it’s fired. And, finally, the feeding system, the extractor and ejector, will leave markings on the spent shell. And, all of these things will apply to a shotgun.
Spent shells can be useful for identifying the make and model of a weapon, and in some cases actually identifying a specific weapon (the same way bullets are). Though, my limited understanding is, that it is less useful for identifying a specific weapon, unless there is some anomaly or defect in the components that handle the shell.
However, if the shotgun isn’t cycled after being fired (with a lever or pump action) or reloaded (with a breach loaded shotgun), then there wouldn’t be any casings left at the scene.
Also, breach loading shotguns and revolvers won’t leave extractor markings, and some don’t even have ejectors. The extractor is the mechanism that removes a round from the magazine and cycles it into the chamber. The ejector removes a round from the chamber and kicks it out of the weapon, so the extractor can load the next round.
If the shotgun is loaded with slugs, and the barrel is rifled, then it should leave striations, though I’m not completely certain this is the case. A smooth-bore shotgun probably wouldn’t, though, again, I’m not sure.
Although it’s not generally an issue with shotguns, suppressors will further scrape the bullet, meaning they can make matching striations much harder or impossible.