First the gun options:
Buy a used Police model. Check on the High Road's Rifles and Shotguns for sale forum. A member is selling good Police models there: http://www.thehighroad.org/showthread.php?s=&threadid=98782
Buy a Remington Express HD or the HD model with the factory extension. Price is right, and you get a NEW gun cheap. While not as well finished or smooth as a Police model, it'll last as long.
Haunt the gun shops and pawn shops looking for a good 870 Wingmaster or Express. Often you can pick up good guns cheaper than any of the above, and if it's a Wingmaster model it's the same gun as the Police model, with a commercial-grade bright finish.
Barrel length. Minimum barrel length is 18" under FEDERAL law. Some states or local areas may differ.
Folding stock. Folding stocks are primarily special-use items for SWAT teams, who actually use the shotgun as a TOOL to force open doors, not as a weapon.
Folders are most often a "Hollywood" thing used in the movies, and by people who aren't familiar with shotguns.
They LOOK like a great idea, and appear to be ideal for a short defense gun.
In fact, MOST people who actually experiment with the folder in realistic shooting courses quickly find out that the folder is one of those "good ideas" that just don't pan out in the "real world".
Recoil from a shotgun loaded with buckshot is HEAVY, and the folder actively punishes the shooter.
The metal or hard plastic is particularly bad on the face.
Firing the shotgun with the stock folded quickly turns up the "dirty little secret" of the pistol grip or folder stock: In real defense/combat shooting, not just playing around on a range, accuracy and speed DROP with the pistol grip stock.
Due to the recoil problems and the better control, speed, and accuracy, MOST people quickly go back to a full butt stock on the gun simply because they HIT better with it.
Optics: Optics on a close range defense gun are actually an impediment instead of an aid.
Standard telescopes are useless on a defense shotgun loaded with buckshot, since the shotgun is at absolute best a 50 yard gun, and most experts say 35-40 yards.
Electronic sights have the problem of the battery or sight failing when you need it. This is going to be a real hazard in a vehicle gun which gets less maintenance.
Any honest shooting comparison quickly proves that a good shotgunner is actually faster without optical sights, and it's the shotguns SPEED that makes it so effective as a defense gun.
On a defense gun you're better off with your choice of plain bead, or some type of rifle sights.
My suggestion is, buy a shotgun and plenty of ammo. SHOOT the gun in as real a HD situation as you can, THEN decide what accessories you want on it.
Remember, about the perfect HD shotgun is an 18" barreled shotgun with a full stock and NO options.
EVERYTHING you add has a trade-off.
The trade-off is lesser speed getting shot on target.
You have to to an HONEST cost-benefit analysis on each option: What are you getting that makes it worth the loss in speed?
Want an electronic sight? Under what circumstances is it going to be a benefit on a 50 yard gun?
It's going to take TIME to turn the sight on, (hoping the sight and battery are OK), and get it on target.
Is whatever benefit you may gain worth the loss in speed and reliability of the sight?
Buy a gun, shoot the gun A LOT, then decide waht you really NEED instead what looks cool or seems a good idea.