Drill a hole in the lid of the mason jar that is large enough for the plug of the cord on the swag kit to just fit through, but not large enough for the socket to fit through.
Pull the plug end of the swag kit up through the hole in the lid of the jar. Keep pulling the cord through until the socket bumps up against the lid.
Use a small piece of electrical tape to hold the socket in place against the underside of the lid.
Screw the light bulb into the socket.
Screw the lid back on the mason jar.
Locate the place on the ceiling where you want the light fixture to hang. Screw a hook into the ceiling. Locate another spot halfway between that hook and the wall where the outlet is, and screw in another hook.
Loop the cord onto the hooks. Run the cord down the wall to the outlet and plug it in.