No real treatment - I just waited for it to heal. That's all you can do with a stress fracture really.
Sounds like it might hopefully not be one in your case though - maybe it's shin splints? In my experience of a tibia stress fracture, the pain was felt on the outside of the shin. I hear shin splints normally affect the front of the bone.