I have the following problem: we know that for a field $\kappa$ of characteristic $0$ usually an elliptic curve $E$ defined over $\kappa$ is such that $End(E)\cong \mathbb{Z}$. This means that one cannot hope to find an elliptic curve with complex multiplication choosing it "randomly".
Suppose that i want to produce and elliptic curve over $\mathbb{Q}$ whose $End(E)$ is and order in $\mathbb{Q}(\sqrt{-D})$: what are the methods currently known to do it? Is it possible to write explicitly the isogeny corresponding to $\sqrt{-D}$? (If it is in $End(E)$ and $D$ is not so large).
Thank you for your time.