Shaun Weiss -- the guy who played "Mighty Ducks" goalie Goldberg -- is getting major penalty box time in real life for petty theft.

Law enforcement sources tell TMZ ... Shaun was at a Fry's Electronics earlier this month and stole $151 in merchandise. Two days after his arrest, he pled no contest to petty theft, and was sentenced to 150 days in L.A. County Jail.

We're told he got a stiff sentence because this was second petty theft bust.

His manager, Don Gibble, tells TMZ, "[Shaun] hopes jail will help him, and maybe while he is in jail he will write something."

Not a diary, but a script or jokes. Shaun's been known to do a little standup.