This is a base to accommodate a G9 lamp socket like the one below. They push fit into the base from below and have four holes for countersunk screws. I have wall mounted mine outside in an outbuilding. Obviously, only use the low voltage LED versions. If you use a high power bulb you will melt the plastic.
The base has a square-ish lens which goes over the top as a diffuser (see picture). However I have also made a G4 lamp holder with the round diffuser . Both diffusers fit either base.
Use sockets like the one pictured below
The author marked this model as their own original creation.