There are no rules for specifically attacking with a shield.
YouThere are two options you could model it by using the improvised weapon rules,use: improvised weapon and unarmed attack.
Improvised Weapon
You could say that a shield doesis an improvised weapon doing, say, 1d4+STR bludgeoning damage.
You would then have to rule on whether it is a light weapon or a finesse weapon, and so on, to answer questions like "does a rogue get sneak attack damage when attacking with a shield?" and "does two-weapon fighting apply to attacking with a shield?" and "can an Eldritch Knight bond with a shield?".
In my game, however,You should also think about helms and gauntlets and boots and so on. If a shield is an improvised weapon then what about a helm (you can head butt a foe with it)? Does this mean an Eldritch Knight can weapon-bond with their magical helm?
Unarmed combat
You could say a shield bash is covered by the unarmed rules (my personal ruling). The reason I did this is to separate things you pick up and drop
This separates things you pick up and drop (improvised weapons) from things you wear things you wear (gauntlets, boots, helm, shield). It also meant I didn't have to worry about the questions inThis means that attacking someone with a shield is mechanically the previous paragraph.same as attacking them with a helm :-(head butt) or armour (elbow strike, knee strike) or gauntlets (punch) or boots (kick). It means you can say "no" straight away when the player of an eldritch knight asks to weapon-bond with their magical gauntlets that they use to punch people.
I rule that unarmed attacks do 1+STR damage for no armour and light armour, 2+STR damage for medium armour and/or shield, 3+STR for heavy armour. I figure that a headbutt or elbow strike while wearing plate should hurt more.
Unarmed strikes (including my rule of shield bashing) are not weapons, so they don't trigger some feats and features.
Notes
Note that theThe game does have a rule called "shield bash". It is not an attack, however, it. It is a shove contest granted by the Shield Mastery feat.