Roxas knows hes not Sora, but that doesnt stop him from loving Riku. He doesnt care that it hurts, or that he constantly feels like hes being used, because it makes Riku happy, and Rikus happiness is what matters most to him. It doesnt matter how bad he feels at the end of the day, how empty his chest feels.
Riku says he loves Roxas, but Roxas knows that its only temporary. Hes only temporary, because the moment Sora comes back is the moment he disappears and he becomes nothing, not even a memory.
Roxas knows that Riku only loves him because Sora is not around, and it stings. He knows that Rikus kisses and I love yous arent meant for him, but pretending they are makes it better sometimes. Pretending takes the sting away, if only for a while.
Roxas knows, as he watches from inside his Somebody, sees the smile on Rikus face upon Soras return, that he was, and always will be, a replacement.