The deal is the first paid product placement deal of its size on an Irish drama.
It will see Phelan's corner shop in the soap rebranded as a Spar next month.
Fair City regularly attracts half-a-million viewers and the deal follows an announcement from ITV that Coronation Street is receiving a six-figure sum to feature a Nationwide ATM in its broadcasts.
But the Broadcasting Commission of Ireland has warned that RTE will have to ensure Fair City complies with its new Commercial Communication Code.
This will require RTE to state before the show is aired that it contains product placement, a BCI spokesman said.
It also requires that any reference or depiction of Spar on screen has to be "editorially justified" and must not give "undue prominence" to it.
RTE said that the editor in chief of Fair City would ensure there were no gratuitous references or prominence given to Spar that would not happen anyway.