A particle is attached to an extensible string (the tension in string, $T = \frac{\lambda x}{l}$) and the particle is pulled so that the string is extended and released from rest. As in this diagram:

SHM is proved by $a = -w^2x$
both the acceleration and the tension are in the same direction (the negative direction) and the particle is to the right of the equilibrium position so $x$ is positive
Resolve in the positive direction:
$$R(->) = -T = -\frac{\lambda x}{l}$$
also F = ma so:
$$R(->) = m(-a)$$
therefore:
$$m(-a) = -\frac{\lambda x}{l}$$
$$ma = \frac{\lambda x}{l}$$
$$a = \frac{\lambda}{ml}x$$
which fits $a = w^2 x$$ but is missing the crucial - sign. because acceleration in SHM is meant to be proportional and opposite to x (when x is positive, a is negative and vice versa because the tension in the string is always pulling the particle back to the center)
(and yes I realise the string will not be taught in the middle, this is for proving SHM while the string is taught)