Can substances pass in and out
Yes, the cell wall is completely permeable, so substances can pass into and out of the cell through the cellulose wall.
How does the cell wall give the cell shape
The contents of the cell press against the cell wall making it rigid. This supports both the individual cell and the plant as a whole. The cell wall also acts as a defence mechanism, protecting the contents of the cell against invading pathogens. All plant cells have cellulose cell walls.