Let $(H,\langle\,|\,\rangle)$ be a separable Hilbert space on $\mathbb{C}$.
$\rho_{\psi}:=\langle\psi,\,\rangle\psi$, where $\psi\in H$ is such that $\|\psi\|=1$.
$P_{\phi}:=\langle\phi,\,\rangle\phi$, where $\phi\in H$ is such that $\|\phi\|=1$.
Prove that $tr(\rho_{\psi}P_{\phi})=|\langle \phi,\psi \rangle|^2$.
Let $\phi_1 := \phi$. Extend the set $\{\phi_1\}$ to obtain an orthonormal basis $\{\phi_1,\phi_2,\dots\}$ for $H$.
From there, compute $$ tr(\rho_\psi P_\phi) = \sum_{k=1}^\infty \langle \rho_\psi P_\phi(\phi_k),\phi_k \rangle $$ Noting that $$ P_\phi(\phi_k) = \begin{cases} 1 & k=1\\ 0 & k > 1 \end{cases} $$