You'll want to look at this whitepaper:
ESRI Shapefile Technical Description[
^]. (By the way, a simple google search found that as it's first result searching for shapefile structure). It's really not a small feat to create a shapefile from scratch.
You're probably better off downloading the Arc SDK and using ArcObjects to create a new shapefile and fill it in with the details of the text file.