Teresa Giudice is heartbroken for the New Jersey judge who sent her and her hubby to prison ... after what appears to be a targeted murder at the judge's home.
The 'RHONJ' star's attorney, James Leonard, tells TMZ ... Teresa was "devastated" by the news this weekend -- namely, that a gunman disguised as a FedEx employee made his way into Judge Esther Salas' home and shot and killed her son. Judge Salas' husband was also shot but survived.
Leonard says, "Knowing Teresa the way I do, I think if she were to have an opportunity to see Judge Salas, I think she would hug her and pray with her." He doesn't believe his client will attend the funeral but says Judge Salas and her family are in Teresa's thoughts.
He adds, "This is such a horrific tragedy, I know that the entire legal community is shocked and devastated and praying for Judge Salas and her family."
Judge Salas, who was not injured in the gunman's attack, presided over Teresa and Joe Giudice's criminal cases back in the day -- sentencing her to 15 months in prison, and Joe to 41 months behind bars.
The judge was also just assigned a class action suit against a bank that loosely involves Jeffrey Epstein.