The Lightning Shield, otherwise known as the Magnetic Shield, is a power-up first introduced in Sonic the Hedgehog 3 and a variant of the standard Shield. In addition to serving as a one-shot barrier against damage and life loss, the Lightning Shield attracts rings towards the player if they get close enough. It is often considered a particularly useful power-up because of this feature.
While all variants of the shield drag rings in, minor details differ from game to game. In Sonic 3 & Knuckles, the shield would be lost if the player took it underwater; and when playing as Sonic, holding a Lightning Shield exchanged the Insta-Shield move with a sparking double-jump, enabling the hedgehog to leap much higher and potentially access otherwise difficult platforms. Finally, the shield made Sonic invulnerable to both electric damage (like the crackling sub-conveyor-belt floors in Death Egg Zone (S&K)), and, curiously, the spiked projectiles hurled by IceCap Zone's Star Pointer. While Sonic R kept being able to lose the shield due to falling in water, none of these features are in effect in any other game where the shield appears: namely Sonic Adventure, Sonic Adventure 2, the Sonic Advances 1, 2 & 3, and Sonic Rush.
The shield returns in classic monitor form in Sonic Generations, and like the original shield can protect against lightning damage and double jump. The shield in this game is called the Thunder Shield.
The Lightning Shield appears in iOS/Android remake of the original game if you set "Items" to "S1+S3" or "S2+S3" in the Level Select menu (or place a Lightning Shield monitor in debug mode). It behaves exactly as it does in Sonic 3 & Knuckles, including the double-jump and disappearing when it touches water.
Sonic being attracted to an electric floor