You should use Gdx.gl or Gdx.graphics.getGLCommon() for functions that are shared by both GL10 and GL20. That way your code is independent of GL version.
If useGL20 is true, then Gdx.gl10 will return null.
Of course, it doesn't matter if you use GL10 or GL20 for static constants (like GL_BLEND), since those will never be null.
As said, ShapeRenderer is not the fastest, but it will probably do fine for most purposes. Another downside is that it relies on hardware anti-aliasing; it varies from device to device, and some don't support it at all.
Also note that if you need lines or rectangles, you can use a regular SpriteBatch; see here
If you need better performance (i.e. Android), you should look into using images, or if you fancy something slightly more advanced, read up on shaders