Feed the electrical cable coming from the ceiling through the knockout hole in the pancake box. (Be sure there's a cable connector attached to the knockout hole.)
Set the box into the hole cut through the ceiling and press it tight against the underside of the joist.
Attach the box to the joist with the two 1 1/2-inch No. 10 hex-head screws provided. Drive in the screws with a drill/driver equipped with a 5/16-inch nut-driver tip.
Wrap the cable's bare copper wire around the grounding screw inside the box. Allow the wire end to hang down.