Read and follow the manufacturer's instructions on the package of the metal safety bar. Basically, you'll mount the base of the bar to the stationary door frame. There will be a bar attached to the base that moves up and down.
Measure from the bottom of the stationary sliding glass door frame up however many inches the manufacturer recommends. Mark the spot with a pencil.
Place the base of the safety bar on the spot you marked to determine where the screw holes need to be drilled. Make sure the base is positioned so the movable bar is raised. Mark the places where you'll need to drill with a pencil.
Set the base aside. Drill the screw holes into the frame. Place the base on the frame again. Align the mounting screw holes with the holes you drilled.
Screw the metal safety bar firmly into place. To use the bar, make sure the sliding glass door is completely closed. Pull down the movable bar so it's positioned between the stationary door and the sliding door. To unlock the door, raise the bar and fold it out of the way against the frame.