Ex-judge fined $5,000 for ordering defendant shocked