This paper presents an analytical pathloss model for reconfigurable intelligent surface (RIS) assisted terahertz (THz) wireless systems. Specifically, the model accommodates both the THz link and the RIS particularities. Finally, we derive a closed-form expression that returns the optimal phase shifting of each RIS reflection unit. The derived pathloss model is validated through extensive electromagnetic simulations and is expected to play a key role in the design of RIS-assisted THz wireless systems.