how to aply a texture to a 2d shape?

the image speak by itself