Getting shield proficiency is fairly thin pickings in 5e.
Mostly, you get it from your class - though any class that has shield proficiency also grants it in the multiclass proficiency gain table, which is reassuring. (Edit: with the exception of Barbarian, which grants neither medium armour, nor shields, with its multiclass proficiencies. Everything that does grant medium armour in multiclass also grants shields, however)
Outside of that, taking the Moderately Armoured feat grands shield proficiency along with it, as do any class features or subclass features that grant medium armour proficiency as part of their benefit (Hexblade, for Warlock, for example, grants medium armour, shields and martial weapons when you choose it)
Shield Master, as a feat, is supposed to represent skill above and beyond normal shield usage - so it should rightfully require shield proficiency to take (it doesn't, as written, technically allowing you to be a master of shields but not proficient in them, which is silly), and should not grant it on its own.
As far as I'm aware, there is literally only one way to have medium armour proficiency but not have shield proficiency, and that is the above mentioned dwarf trait. Everything else, no matter how you come at it, grants shields along with medium armour, making attaching shield proficiency to heavy armour as well superfluous. It's effectively and functionally a part of medium armour proficiency, just mentioned alongside it for various other minor reasons; it already comes part and parcel of medium armour proficiency, in every single other way you might get it, except that one outlying dwarf trait.
Rather than adding shield proficiency to the heavily armoured feat, the proper fix here would be that Mountain Dwarf should get Shield proficiency along with their Medium Armour proficiency, just like everything else that grants it - it's an oversight that I'm surprised they have never fixed.
Last edited by Niara; 03/12/21 02:57 AM.