$$\int_0^a \sin (\pi x/a)\delta(x-a/2)\sin (\pi x/a)dx$$
The context here is that I am taking the inner product $\langle \psi |H'|\psi \rangle$ (physics problem), so I believe the order matters. The dirac delta function must first operate on the right-most $\sin(\pi x/a)$, but I don't know how. Could someone help me out?
The dirac delta function is a function (sort of), not an operator, so the order isn't important. What is important is the following property. For all functions $f$, $$ \int_a^b f(x) \delta(x-c) dx = \begin{cases}f(c) & c \in (a,b) \\ 0 & c \notin (a,b)\end{cases} $$ Since $a/2 \in (0,a)$, for your integral we have $$ \int_0^a \sin^2\left(\frac{\pi x}{a}\right)\delta\left(x - \frac{a}{2}\right) dx = \sin^2\left(\frac{\pi}{2}\right) = 1 $$