Two points need to be observed when using a verb or verb-phrase as a modified to form a relative clause:
Unlike in English, all modifiers go /before/ the element they modify in Chinese:
他喝的水不很乾淨
這是我朋友送我的禮物
The word 的 has to be inserted between the modifier and the element it modifies:
我下午看的電影很有意思。
The film I saw this afternoon was very interesting.
給你開門的那個人是我妹妹。
The person who opened the door for you was my younger sister.
跟他跳舞的姑娘是我的同學。
The girl who danced with him was my classmate.