$\int \sin\theta\, d\theta = \int\,d\cos\theta, \tag{1}$ or $\int \sin\theta\, d\theta = -\int\,d\cos\theta \tag{2}$
which one is correct? Due to $\sin\theta\,d \theta = -d\cos\theta$, I think (2) is correct. However (2) is so easy to mislead if someone what to apply definite integrals. Take the wrong equation below as an example.
$\int^\pi_0 \sin\theta\, d\theta = -\int^1_{-1}\,d\cos\theta$.
And with interpreting indefinite integrals as the definite integrals in $[a, \theta]$, $\int \sin\theta\, d\theta \rightarrow \int^\theta_a \sin\theta\, d\theta$.
We don't need to add a minus sign to reverse the variable and the lower bound.
$\int^\theta_a \sin\theta\, d\theta = \int^{\cos\theta'}_{a'}\,d\cos\theta'$.
Does this imply that we can use (1)?
$\newcommand{\d}{\mathrm{d}}$ It is correct that $\d(\cos\theta)=-\sin\theta\,\d\theta$ simply because the derivative of $\cos\theta$ is $-\sin\theta$. In your example, $$ \int_0^\pi\sin\theta\,\d{\theta} = -\int_{1}^{-1}\d(\cos\theta)=\int_{-1}^1\d(\cos\theta) $$ because, when $\theta=\pi$, $\cos\theta=-1$, and when $\theta=0$, $\cos\theta=1$. You need to be careful when doing substitutions because even when "integrating over" the same region, the direction is meaningful and important.