A TS input is an unbalanced input. In unbalanced interconnection, the signal is defined by the voltage between the ground/shield and the other conductor.
A TRS input is a balanced input. In balanced interconnection, the signal is defined by the voltage between the "cold" and "hot" conductors. There is a third ground/shield conductor, but it is only used to protect the system against interference and is NOT used to carry the signal.
An RCA output is an unbalanced output, so it only has two conductors and the voltage between them defines the signal. Since a balanced input expects the signal between cold and hot, it makes sense to connect the two unbalanced output conductors to the cold and hot balanced input connectors - conventionally, RCA sleeve to cold and RCA tip to hot (though the opposite would likely also work).
So, now that we know what to do with the balanced cold and hot, what about the balanced ground/shield? Well you have two choices, which are both valid but have implications regarding noise performance. You can tie the ground and the cold together (preferably as close as possible to the unbalanced output), as
@sergeauckland suggests. This grounds the shield end-to-end, improving resistance from outside interference. In particular it prevents the cable from acting like an antenna. But it also invites ground loops since the signal path is now tied to the balanced equipment chassis ground (and from there to the mains earth if the equipment is class I etc.). The alternative is to leave the shield connected only to the balanced input ground but leave it disconnected (floating) from the unbalanced output. Depending on which method you choose you will attract noise from different sources, so it really depends on your particular situation and there is no universal answer. In my experience I often get noisy ground loops if I connect the shield to the unbalanced output ground (especially if the source is a PC) so I tend to leave it disconnected, and
@sergeauckland apparently has the opposite experience.