Let $F$ be a presheave on a category $C$. If $F$ is representable, then there is a $B \in C$ such that $F=Hom(-,B)$. Then, it is not hard to prove that its category of elements $E(F)$ is equivalent to the slice category $C_{/ B}$.
Is it true that if the category of elements $E(F)$ of $F$ has a terminal object, then $F$ is representable? If so, how do I prove it?
Yes, this is true.
Suppose that $E(F)$ has a terminal object $(B, y)$, and define $\theta : F \to \mathsf{y}(B)$ as follows. Given $A \in \mathrm{ob}(\mathcal{C})$, define $$\theta_A : FA \to \mathrm{Hom}_{\mathcal{C}}(A,B)$$ by letting $\theta_A(x)$ be the unique $f : A \to B$ given by the (unique) morphism $(A,x) \to (B,y)$ in $E(F)$.
Verify that $\theta$ is a natural isomorphism.