Dale, from Portsmouth, started working at HMP Coldingley – her first and only posting – in September 2021.
She had had “at least some contact” with Sharif by January and the pair were engaged by May, the court heard.
Defending Dale, Syam Soni said her offending was influenced by her mental health difficulties, including depression, anxiety, emotionally unstable personality disorder and post-traumatic stress disorder (PTSD).
He claimed Dale was “ill-equipped” for the prison environment and more vulnerable than others.
Sharif was at the time serving a 12-year and 10-month sentence for an “extremely violent robbery of a jewellers on the south coast”, Judge Hehir said.
Other prison officers “obviously had clocked on to what was going on”, he added.