With the rules as written, shields are not weapons. They are not considered capable of doing enough damage to warrant a ruling. Their primary purpose is to grant +2AC, and their primary drawback is that you can't use that hand for another purpose such as holding a weapon.
This becomes clear when you look at Shield Master Feat (PHB 170), where we might reasonably have expected to see damaging shield bash rules. It allows you to attempt to push someone as a bonus action when you make an Attack Action. If you hit, you knock the target prone or 5 feet away from you. Note that it doesn't do any damage.
As an aside, the "Shove" Attack Action can achieve the same result (PHB p195); it is available to all, though harder to pull off. Contest Strength (Athletics) vs the the target's. It uses one of your attacks if you have more than one. Success knocks the target prone or 5 feet away from you. But note: Shove makes no mention of using a shield.
Shield Bashes according to D&D 5e Rules
The shield can only be used to cause damage if it is used as an Improvised Weapon. Importantly, while doing so, it is not functioning as a shield.
When using a shield as an improvised weapon (PHB p147-148) , you are Two-Weapon Fighting (PHB p195). Because of this, you get a bonus action with which to attack with the shield. Also, don't add your ability modifier to the damage of that bonus attack unless the modifier is negative.
The shield bears no similarity to an existing weapon so does 1d4 damage with no chance to add a proficiency bonus to your hit roll unless you have the Tavern Brawler feat.
You would need to invest in the Dual Wielder Feat (PHB p165) to use it since it is not a light weapon. You lose the +2AC from the shield as it ceases to act as a shield, but gain +1AC for using two 'weapons'.
In summary...
To attack with a shield in your off-hand is an improvised weapon bonus attack requiring the Feat Dual Wielder, doing d4 (minus any negative Strength modifier) damage, and reducing AC from +2 for a shield to +1 for Dual Wielder.
Characters with the Tavern Brawler feat roll and add their proficiency bonus.
In summary, you would only resort to it if you were disarmed of your main weapon.
Arguably you could then switch the shield from an off-hand improvised weapon to your main (improvised) weapon, allowing you to add your Strength Bonus to your damage, and no longer requiring Dual Wielder Feat. In this case...
To attack with a shield in your weapon-hand is an improvised weapon attack, doing d4 (plus your Strength modifier) damage. Reduce AC by +2 while your shield is being wielded as a weapon.
Characters with the Tavern Brawler feat roll and add their proficiency bonus.
Better Tactical Choices
Once you have dual wielding, you're better off using a weapon in that
hand to do d8 damage.
The Shield Master feat is a better option for shield bashing. As a
bonus action you can shove which is way better than 1d4 damage most
of the time, since you give all your regular attacks advantage and
some of your allies, after you knock the target prone.
That a shield bash only pushes an opponent back tally's with real world usage. In medieval combat, a shield bash was used to wrong-foot or floor an opponent. It was the weapon strike afterwards that did the damage. Trying to do actual damage with your shield was likely to leave you defenceless. It makes a poor weapon against real armour. Better and safer to use your actual weapon for the purpose for which it was designed.
The popular idea of the devastating shield bash is perpetuated by fiction, where a warrior's legendary strength is often expressed visually by his ability to literally bat minions away with his shield.
During a reenactment exercise, I was hit with a shield using the flat of it, the sharp edge and the point at the bottom. The shield was accurate in size and weight. It hurt, but not as much as a blow from an axe or sword would, with its leverage and momentum (thankfully, these were less authentic).
I've also had the privilege of being able to talk to a stunt man who specialises in horse and sword fighting (one of the Devils Horsemen team). He said, "I might push someone back so I can swing with the sword. If they are on top of my shield they deserve it. Swinging out with the shield... I wouldn't, especially if there are a lot of people around." It would create an opportunity for an enemy.
A lot of players want it to be true than you can deliver extra damage during your round with the shield, but this has wide ranging implications for class balance and fairness. It also owns up arguments about whether a head but with a helmet, or a punch with a mailed fist should do more damage than in the RAW.
Jemmy Crawford, a cowriter of 5e said in a tweet that when used as an Improvised weapon, a shield retains its characteristics as a shield, therefore continuing to provide +2AC. Sacrilegious though it may be, I have to say I think he's made a mistake by coming out with that. His case was that a spell focus item is still a spell Focus item even when it is being used for improvised attacks, so the same should be true of a shield and it's armour class bonus, but I would argue that a shield is no longer in a position to confirm defensive qualities if it is being waved around as a weapon. Drawing this distinction also helps keep things clearer. The Shield is considered as an improvised weapon and abides by those rules without the muddiness of adding rules that are not in the book.
In researching this, I think the rules are sound (if hard to piece together) and do not have a glaring gap in them, as some people argue.