At equilibrium
$$ \begin{align} K &= \exp\left(\cfrac{TΔS^\circ - ΔH^\circ}{RT}\right)\\ ⇒ \frac{\mathrm d \ln K}{\mathrm dT} &= \frac{ΔH^\circ}{RT^2} \end{align} $$
If enthalpy change is positive, change in $\ln K$ w.r.t. $T$ is positive. Hence, $\ln K$ and therefore $K$ increase (position of equilibrium shifts to the right) as $T$ increases. And, $\ln K$ and therefore $K$ decrease (position of equilibrium shifts to the left) as $T$ decreases.
If enthalpy change is negative, change in $\ln K$ w.r.t. $T$ is negative. Hence, $\ln K$ and therefore $K$ increase (position of equilibrium shifts to the right) as $T$ decreases. And, $\ln K$ and therefore $K$ decrease (position of equilibrium shifts to the left) as $T$ increases.
Can you give a similarly mathematical reasoning for why a reaction
$$\ce{A(g) <=> 2 B(g)}$$
has its equilibrium position shifted to the left as the pressure of the surroundings increases?