I understand how a divergent duct can take sonic air and increase it to supersonic but I'm still not quite clear on the intake part and how it contributes to thrust.
As JT has explained, supersonic intakes employ a series of shock waves to decelerate the incoming air to subsonic speed. This converts most of the dynamic pressure into static pressure. The final part of the intake is a divergent duct, so as the (now subsonic) air flows through it, the deceleration process continues, causing a further increase in static pressure.
The overall result is that the static pressure inside the intake is much greater than that outside the intake. This high static pressure inside the intake pushes forward against the divergent sides, thereby exerting a forward force on the intake.
Provided the engine keeps running at a sufficiently high RPM it will draw the air out of the rear of the intake. This prevents the high static pressure from exerting a rearward force on the aircraft and also enables the air to continue to flow into the intake.
Shutting down the engine would remove the pumping effect. This would cause the airflow through the intake to break down, producing a very large pressure rise in the intake. The intake would then stop producing thrust and start producing a great deal of drag.