A prison governor accused of corruption tearfully told a court she had been “incredibly stupid” but denied doing anything wrong.