It is possible to enable PHP opcode caching extensions (e.g, XCache and APC) under shared hosting, but I wouldn’t recommend it. They will often increase the memory usage of PHP to the point that you will start running into resource limits, causing your application to fail.
Keep in mind that caches are only useful if you are running PHP as FastCGI. If you have PHP running as CGI, the cache gets thrown out for every request, so it will just slow you down.
Memcached will not work on shared hosting.