Fiorentina swept RFS aside in Riga, but still go through as Conference League runners-up, so will face a side dropping down from the Europa League.
The Viola were missing Nico Gonzalez, Riccardo Sottil and Gaetano Castrovilli for the trip to Latvia.
They were already qualified, but needed to get a better result than Istanbul Basaksehir against Hearts to snatch top spot.
Riccardo Saponara got to the by-line and pulled back for Antonin Barak’s header, surprising the goalkeeper at the near post.
Jonathan Ikone forced a save and curled just over, as did an Ilic header, before Barak got a back-heel flick to a Lorenzo Venuti corner, setting up the Arthur Cabral tap-in.
Moments later, Saponara made it 3-0 with a wonderful right-foot curler into the far top corner.
Barak and a Di Stefano diving header only hit the side-netting and Pietro Terracciano kept the clean sheet with a splendid fingertip save on the Lipuscek free header.
Terracciano made another wonderful save on an Emerson scorcher and Jovan Vlalukin was offside on the rebound.
RFS 0-3 Fiorentina
Barak 7 (F), Cabral 44 (F), Saponara 45 (F)