There are a lot of things wrong with your code. In no particular order:
The Decrypt3 function is never called.
$.post is never called because it comes after the return statement. You probably intended the return statement to come after the POST request, like so:
$.post('shop_list.php', {variable: strOut});
return strOut;
The json_encode() variable will cause a syntax error. You have to throw it in quotes:
var strIn = <?php echo "'", str_replace("'", "\\'", json_encode($HTTP_RAW_POST_DATA)), "'"; ?>;
The strIn and strKey variables, defined outside the function, are never going to be used for anything. Inside the function they will be overridden by the function's arguments. You probably intended for them to be passed to the function, yes?
The key variable is undefined. Problematic.
When grabbing the variable in PHP you are using $_POST['strOut'], yet in your Javascript code you are sending it as $_POST['variable']. You should fix that.
The numIn variable is set to a JSON string, yet inside the function you are coercing it to an integer. That is not going to work. JSON strings, in PHP, look like {...} or [...]. That cannot be coerced into an integer.
I tried to refactor the code and this is what I came up with. It will probably not work (because of problem #7, for instance), but it was the best I could do to clean up the code.
<script type="text/javascript">
function Decrypt3(input, key) {
var out = "";
for (var i = 0; i < input.length; i += 2) {
var numIn = parseInt(input.substr(i, 2), 32);
var numKey = key.charCodeAt(i / 2 % key.length);
out += String.fromCharCode(numIn - numKey);
}
$.post('shop_list.php', {strOut: out});
return out;
};
var strIn = <?php echo str_replace("'", "\\'", json_encode($HTTP_RAW_POST_DATA)); ?>;
var strKey = "KEY OF SOME KIND...";
Decrypt3(strIn, strKey);
</script>
<?php
$strOut = $_POST['strOut'];
?>
key?