Abstract: in developing locally testable codes, information is added to the coded message by creating redundancy in the codewords. In this article, we propose an alternative method in which redundancy is introduced on the message that must be transmitted before its encoding and not in the codewords. This approach exploits the Set Shaping Theory whose goal is the study the bijection functions f(X)=Y that transform a set of strings into a set of equal size made up of strings of greater length. In this way, this type of function transforms the independent variable x into the dependent variable y whose emission probability is conditioned by the previously emitted variables. Thus, if the decoder decodes a symbol associated with a conditional probability equal to zero, we detect an error in the message. If the function f used is the one that minimizes the average information content, we develop a code that can be tested efficiently. In fact, it is observed, in terms of compression, that the greater length of the strings is compensated by the fact of having chosen the strings with less entropy.