Friction and confinement effects on a shallow recirculating flow