If an enemy is not wearing metal armor but is wielding a metal shield, do you get advantage on the attack roll for Shocking Grasp?
While a shield can be indeed made of metal, you are wielding it, not wearing it.
In the equipment chapter (p. 144) the PHB refers to a wearer of armor, but says you wield a shield.
"Rules Answers: March 2016" from Wizards of the Coast points out that "various various game features distinguish between the armor you wear and a shield you wield." It provides the Monk needing to forego wielding shields and wearing armor, whilst the Barbarian only foregoes wearing armor. This is probably another such case.
So you will not count as wearing armor made of metal.
No, you would not get advantage on Shocking Grasp for attacking a target whose only metallic armor is a shield.
There are a few sections in the book we can look to for clarity on this. One of the most useful ones is actually in the Druid section. In the armor proficiencies section, it notes druids will not wear armor or use shields made of metal. For the purposes of your question, we can take the following from that:
"Using a shield" is not considered wearing armor (hence the two separate clauses there), therefore Shocking Grasp's advantage clause doesn't apply.
As there's only one type of shield in the book, we can conclude that there's no (or little) functional difference between a metallic or non-metallic shield, and therefore there's no reason to have a metal one over a wooden one/to unnecessarily 'punish' someone using a metal shield by granting advantage on the Shocking Grasp against them.
Yes, you would Advantage. A shield is considered part of your armor and is subject to the rules accordingly.
PHB pg.144, emphasis mine:
Armor Class (AC). Armor protects its wearer from attacks. The armor (and shield) you wear determines your base Armor Class.
In fact, all of page 144 details that shields are considered armor, rather thoroughly actually. The header is Armor and Shields, and the section under Armor Proficiency details all the disadvantages of trying to use either an armor or shields without proficiency. More specifically, it makes a statement about both, and applies the rule broadly to encompass all armor and shields without separation.
So if the character has hide armor, and a metal shield, they count as wearing metal armor unless they stow their shield.
Yes, a shield will conduct electricity to the person wielding it as well as armor does to the person wearing it. The spirit of the rule is to allow the spell caster to gain advantage by attempting to shock someone through their metal defenses.
Different materials of shields are available for a reason, and they have different properties. A wooden shield may be vulnerable to fire; a metal shield should be vulnerable to electricity attacks.