OpenGL has the GL_ARB_ES2_compatibility but i'm not entirely sure how to use it. Is it only that it was updated to include the features of OpenGL ES 2.0 or is it possible to make sure that you only use the features of OpenGL ES 2.0. For example the shader, what #version
would i use in this instance for the glsl shader?
You can find specification at https://www.opengl.org/registry/specs/ARB/ES2_compatibility.txt
This extension adds functions that are present in ES2 but missing in GL3. Since there is no enable/disable for this extension, it shouldn't affect GLSL and does not limit you to only use ES2 functionality.
You could create GLES2 context instead (but not every driver supports it), and use e.g. #ifdef GL_ES
in shaders. Even so, there would be no guarantee implementation supports only GLES2 and nothing more. Since this path is rarely used and hence poorly tested, it probably wouldn't be a good idea to do it.
If you need to be absolutely sure you use only ES2 functionality, you probably should dump every function call from e.g. profiler and check it agains gles2.h
(could be automated). You wouldn't test shaders this way, however.