EXCLUSIVE

Joshua Shintani -- best known from his cameo in "Shallow Hal" has died at the age of 32 ... TMZ has learned.

Joshua's mother says she took him to an emergency room early last week on Kauai, and doctors discovered he was battling an advanced case of pneumonia. Joshua died on Wednesday.

He had became a local legend in his native Hawaii after landing the memorable scene with Jack Black ... where Joshua strummed a ukulele and played, "Never Forget Where I'm From."

Peter Farrelly was on vacation in Hawaii when he discovered Joshua, a high school senior at the time, strumming his uke outside a public library. He signed him up for the movie on the spot.

'Hal' was the only movie Joshua ever did.

A rep for the Farrelly brothers tell us Joshua, "had a soul that glowed like a lighthouse. We feel honored to have known him."