take a new blank text file and add a code like this, just change the material name and the image file (marked in white):
material JustinBieber
{
technique
{
pass
{
ambient 0.588235 0.588235 0.588235 1
diffuse 0.588235 0.588235 0.588235 1
specular 0 0 0 10 0
texture_unit
{
texture Justin.jpg
}
}
}
}
Then save it as a .material file. Be sure you can see all file extensions, and the file name end with .material (not .txt or .material.txt )