Shamans have had a varied life in D&D.
Already brought up is the
1e Dungeon Master's Guide where shamans were humanoid clerical spellcasters generally lower powered than PC oriented clerics, though a decent power up over standard humanoids.
In
1e Deities and Demigods this was carried forward even for giants, but American Indians used the full powered clerics just as Greek and Norse and fantasy pantheons did.
In Basic you had PC shaman classes in
GAZ10 Orcs of Thar (plus a wicca class),
GAZ12 Golden Khan of Ethengar, GAZ13 Shadow Elves, and
GAZ14 Atruaghin Clans.
In 2e a lot of those Basic Gazetteers were dual statted for 2e as well plus there was a whole
Shaman sourcebook that introduced a whole optional spirit realm for D&D cosmology. The Shaman is book is interesting having originally been planned for Mayfair Games's Role Aids line which was acquired by TSR after a lawsuit.
The Forgotten Realms 2e god book
Faiths & Avatars added in a shaman class with spirit powers along with a mystic and crusader and divine spellcasting monk classes.
The 2e
Complete Priest's Handbook there was a savage priest kit which was described as "a shaman of a savage tribe".
In 3e there was the spirit shaman in
3.5's Complete Divine. In the 3e and 3.5
Dungeon Master's Guide the role of humanoid NPC shaman from 1e was genericized to the adept and applied to any race as a lower powered NPC class. I am sure somewhere there was a shamanic prestige class and I know of multiple OGL shaman classes.
In 4e the shaman class was from
Player's Handbook 2, they were primal powered leaders and not divine power source.
In 5e I am not sure off the top of my head where there are shaman things other than some references in the MM.