I had a hysterosalpingogram. Could this have shown my endometriosis?

No. The hysterosalpingogram mainly shows if the tubes are open or closed, if there is any scarring in the endometrial cavity or any other defect in the cavity that may affect implantation. Laparoscopy is the gold standard for the diagnosis of endometriosis.
No. Hsg is only good at telling whether your tubes are open and whether there are any irregularities in your uterine cavity.