A flashlight is a bit different to this. It would evenly distribute the beam power across an area, so a broad patch of the target would get scorched. A shotgun effect would concentrate the beam power in few specific spots, instead of just one as with a regular laser weapon.
I think the way you'd do this in practice is to have a single high powered laser emitter, and put it through a rotating multi-facetted prismatic lense. The lense would send the laser beam down one path, then when the next facet rotates into place the beam path would be shifted across a little, etc. So if you had 8 facets, the beam would be sent down 8 different slightly divergent paths. With a setup like this the weapon could also operate in laser rifle mode by just not rotating the lense, and leave it on the facet that is best aligned with the weapon's sights.
Of course in shotgun mode the penetration and energy output for each sub-beam would be a fraction of that of the weapon in rifle mode, but of course that's essentially the case with regular shotguns as well. After all shotguns can also fire single rifled slugs.
One advantage of doing this with a laser wepaon instead of a slug weapon is that you could introduce a 'choke' lense that would potentially be much more effective than the choke on a regular shotgun.
A regular shotgun choke is a slight constriction in the bore of the shotgun at the mouth of the barrel. It's intended to cause the shot to stay grouped together for longer, extending the effective range of the weapon but there are severe limits to how strong this effect can be. Without a choke, and with a shorter barrel, the shot spreads out more quickly. With the laser shotgun you could have several swappable 'choke' lenses that cause the multiple beam paths to diverge from each other more or less rapidly, perhaps having a mounting so you can rotate different lenses into the beam paths. This way you could extend the effective range of the wepon by having choke lenses that keep the beam spread low enough to form a useful group to essentialy the full range of a laser rifle, while also having the option of more divergeant choke lenses that form useful spreads at shorter ranges.
Simon Hibbs