This exercise asks to evaluate the integral from 0 to pi. I worked it out by breaking the function into two integrals where the first had lower and upper limits of 0 and pi/2 respectively and adding it to the integral with lower and upper limits of pi/2 and pi respectively.
Now, since the integral is not continuous over its domain [0, pi/2], how can we use FTC2 on it?

You can still evaluate the integrals individually and then add them together. There is a jump discontinuity at $\frac{\pi}{2}$ due to the interval given in the piecewise, but this point will not impact the sum. That is because the thickness of a single point is intuitively $0$.
Consider the point $c$ (Note: c is finite):
$\int_c^{c} f(x) dx= F(c)-F(c)=0$ by the FTC.
Additionally, note that the function is integrable from that interval.
$\int_0^{\pi/2} \sin(x) dx = [-\cos(x)]_0^{\pi/2} = 0-(-1) = 1$