Hardwiring a plugged light
Many cord connected light fixtures do not have a ground. The power going to the light socket is the black or hot wire to the center tab in the fixture, the white or neutral goes to the outer threaded part of the socket. If you want to hard wire this you should use a cord grip where it enters the box to protect the wires from being cut and or being pulled out if someone trips over the cord