A error correction mechanism (or error mitigation) is needed to lower the perceived noise. To do so, you apply the error correction procedure at a "lower" level than the level you use to perform the computation. Lower level means the qubits used to describe the code are closer to the physical implementation, while the qubits you use to perform the computation are the logical qubits that the code exposes.
To perform error correction, you should not decode anything (by that I mean do the inverse of the encoding operation) as that would put you logicial (precious) information directly back onto the less protected physical qubits.
Error correction is performed by making appropriate measurements to reveal the syndrome of the error. From this syndrome, you can then use several algorithms to recover the likely error that affected your physical qubits and correct its effect.
As you mentionned, this whole procedure is not guaranteed to give good performance as manipulating the physical qubits (to perform the syndrome measurements and the correction) might just mess it up more. Yet, by doing this carefully -- that's the whole point of fault-tolerance -- you can pile up several level of such scheme and if the physical errors are low enough, each level reduces the overall error leaving you at the very top with logical qubits that are essentially error-free.
One last thing: here you didn't implement any useful transformation on the logical qubits (ie computation). For the whole scheme to work, you also need to be able to manipulate the logical qubits without having to decode them as it would expose your precious quantum information again to the high error rate of physical qubits. This is also the focus of fault-tolerant quantum computing.
Right now, experimental system are struggling to achieve the low error rates needed to perform a layer of FTQC encoding, not to mention the high number of physical qubits that are needed to perform several such layers.
So, if you implement the 9-qubit Shor code, this will result in increased error rates while decreasing the number of available qubits to perform useful computation by a factor 9. So if you are doing it as an exercise to see what happens, that's great. If you try to mitigate errors for performing a useful QC, then you should look to some other technique taylored to your problem to mitigate the effect of noise.