Background
Electromagnets, solenoids, and relay coils all perform their functions by creating a magnetic field. This magnetic field is the result of electric current in a coil of wire around a ferrous core of some kind. If the electric current is DC, the magnetic field is created at a constant, stable strength. However, electric service around the world is provided as AC, and since AC power changes its polarity at 50 or 60Hz, the resulting magnet would switch its North and South poles back and forth at that same frequency. This is not a serious problem, as both the North and South poles attract iron exactly the same. However, the magnetic field, following the same sine wave pattern as the electric current, drops to zero twice each cycle during these transitions. This creates an unwanted chatter or vibration.

Shading Ring
A shading ring is a ring of copper or silver, or sometimes a few wraps of wire, placed around half of a ferrous core (such as an electromagnet) by way of a notch in the end of the core. This functions as a shorted secondary coil in the electromagnet, the primary coil being the one connected to the power supply which is powering the electromagnet, which wraps around the entire core (not just half the core).

This setup is very similar to a transformer, in which two coils are wrapped around a common ferrous core in such a way that mutual inductance from the AC current in the primary coil will induce a current in the secondary coil. It is important to note that the current in the secondary coil is a result of the changing magnetic field created by the primary coil, so that as the primary coil's magnetic field is increasing or decreasing in strength at its maximum rate of change (the zero crossings of the sine wave), the current induced in the shading ring is at its peak strength. Likewise, at the peak strength of the primary coil's magnetic field, the field strength is changing at its minimum rate, and the current in the secondary coil is zero. Thus the alternating magnetic field created by the shading ring is shifted 90 degrees out of phase with the magnetic field created by the primary coil.

This is why the shading ring only goes halfway around the end of the core, through a notch in the end of it. The side without the shading ring has a magnetic field as dictated by the primary coil of the electromagnet, and the side with the shading ring has a magnetic field shifted 90 degrees out of phase. Although both sides of the electromagnet have alternating magnetic fields, at no point is the magnetic field ever zero on both sides of the energized electromagnet at once.

Relays and Solenoids
As discussed above, without a shading ring the alternating magnetic field drops to zero in an AC electromagnet twice each electric cycle. This means the magnet has no strength for a brief period twice each cycle, which creates unwanted chatter and vibration, as well as stress on the components. This is because the contacts on the relay, or the plunger of the solenoid, are returned to their unpowered position by a spring during these low-strength periods.

With a shading ring, the end of the electromagnet is split into two poles, out of phase by 90 degrees, so that as one side's magnetic field drops to zero strength, the other side's strength is peaking, and vice versa. This ensures that the contacts are attracted by the electromagnet at all times the coil is powered, and the spring return does not pull the contacts or plunger back.

Applying DC power to an AC relay with a shading ring will not cause problems in its operation. Since the DC current does not rise and fall, it creates a steady magnetic field which does not cause the mutual inductance necessary to create a current in the shading ring. The shading ring simply sits idle.1

Shaded Pole Motor
Single phase AC electric motors suffer from one serious complication in that they require some extra component to tell them which way to spin. There are a number of solutions to this, most commonly the capacitor start motor. A shaded pole motor is another solution. By placing a shading ring around half of the end of each motor pole, the magnetic field on the shading ring half is delayed by 90 degrees with respect to the half without the ring. This means the peak strength of the shading ring half of the motor's pole comes just after the peak of the half without it, and this unbalanced magnetic field provides a directional pull to the motor, telling it which direction to spin. Shaded pole motors are very simple and very rugged, with no additional moving parts. However they are also very inefficient, typically less than 25% efficient. As such, they are only practical for very small motors, such as record players or cooling fans for AC electronics.

1. To be perfectly accurate, the shading ring does energize briefly at the initial application or removal of the DC current, as the magnetic field rises or falls to its final, stable strength. However this can be ignored and rarely has a noticeable effect on operation.