The officer was shot in the foot and remains in hospital in a stable condition, police say.