I'd like to transform a shapefile into raster file in QGIS and the opposite way back also (raster to shapefile).
Can you help me?
For Shapefile to raster see How to convert a vector layer to raster?.
You're looking for "Rasterize" and "Polygonize" tools in Raster menu (gdal plugin).