I like to Fourier transform the following product of functions:
$$g(\vec{r})f(\vec{r}).$$
So I like to calculate the following:
$$\int g(\vec{r})f(\vec{r}) e^{-i\vec{k}\cdot\vec{r}}d^3r.$$
$\vec{k}$ is a discrete wave vector. I also know how the solution has to look like
$$\sum_\vec{q} g_{\vec{k}-\vec{q}} \,\,f_{\vec{q}}.$$
I figured that I somehow have to use the convolution theorem. But I am not sure how I can correctly use it. I find that
$$FT(gf) = FT(g) * FT(f)$$
where $FT$ is the Fourier transform and $*$ is the convolution. I applied this as follows
$$\int g(\vec{r})f(\vec{r}) e^{-i\vec{k}\cdot\vec{r}}d^3r=\underbrace{FT(g(\vec{r}))}_{g_\vec{k}} * \underbrace{FT(f(\vec{r}))}_{f_\vec{k}}= \int f_\vec{q}g_\vec{k-q} d^3q .$$
The last step is the definition of $*$. This almost looks like where I need to go but instead of a sum I have an integral. Do I just have to use the definition of the discrete convolution in the last step? Then I think I have found the solution but I am not 100% sure if the way to get there is correct.
Yes, so the result is just $\sum_\vec{q} g_{\vec{q}} \,\,f_{\vec{k} - \vec{q}}$, or alternatively $\sum_\vec{q} g_{\vec{k} -\vec{q}} \,\,f_{ \vec{q}}$.
But it is not $\sum_\vec{q} g_{\vec{k}-\vec{q}} \,\,f_{\vec{k}}$ (third expression in your question)