Former MD judge pleads guilty to having defendant shocked