Shapefiles only store attribute data in the dbf file, the other files associated with the shapefile contain the geometry data and metadata in binary and text formats. The shapefile binary format is open, but you are on a good track using QGIS to do the conversion rather than reinventing the wheel.
In QGIS,
- right-click on the shapefile in the layers panel and choose "Save As".
- At the top, choose "CSV" from the "Format" drop-down.
- Set the file name in the "Save As" text box.
- Under CRS, choose EPSG:4326.
- Under layer options at the bottom, make sure "Geometry" is set to "AS_XY" if you have point coordinates. For a line, you likely want "AS_WKT".
These steps, together with the 4326, should get you long-lat coordinates. The line coordinates will be in well-known text format (WKT), as described here.
There is a whole lot more that can be said about coordinate systems, ways to store data, etc., but this should be a starting point for you.