It is clear that $f(x)=0$ is a trivial solution to this integral equation. However, in separating out the original IE like this:
$$f(x)=x\left(\lambda \int_0^{\pi}f(y) \, dy\right)+\lambda\int_0^{\pi}y \, f(y) \, dy,$$
the ansatz $f(x)=Ax+B$ suggests itself. Plugging this into the equation yields the equation
$$Ax+B=x\lambda\left[\frac{A\pi^2}{2}+B\pi\right] + \lambda\left[\frac{A\pi^3}{3}+\frac{B\pi^2}{2}\right].$$
Setting the coefficients of like powers of $x$ equal yields the (mostly) invertible (and definitely) homogeneous system of equations:
$$A=\lambda\left[\frac{A\pi^2}{2}+B\pi\right]$$
$$B=\lambda\left[\frac{A\pi^3}{3}+\frac{B\pi^2}{2}\right].$$
For most values of $\lambda$, the system is invertible, which implies the trivial solution. (So we see that the trivial solution is a special case of our ansatz, though we could have seen that from the get-go.) However, if we cast this into standard $\mathbf{A}x=0$ matrix form, we can take the determinant of the matrix $\mathbf{A}$ and set it equal to zero to find if there are non-trivial solutions. We obtain the equivalent system
$$0=A\left[\frac{\lambda\pi^2}{2}-1\right]+B\lambda\pi$$
$$0=A\,\frac{\lambda\pi^3}{3}+B\left[\frac{\lambda\pi^2}{2}-1\right].$$
Taking the determinant yields the quadratic
$$\frac{\lambda^2\pi^4}{12}+\lambda\pi^2-1=0,$$
with solutions
$$\lambda=\frac{-6\pm 4\sqrt{3}}{\pi^2}.$$
We can plug this into one of the relationships between $A$ and $B$ to get a parametrized family of solutions. We obtain
$$B=\frac{A\,(-2\pm\sqrt{3}\,)\,\pi}{3\pm 2\sqrt{3}}.$$
The final solution, therefore, to the integral equation is
$$f(x)=tx+\frac{t\,(-2\pm\sqrt{3}\,)\,\pi}{3\pm 2\sqrt{3}},$$
where $t$ is a parameter.