Materials - Sphere into square

How do i use this with a texture ?