If you have people with a Stakeholder license they won't be able to see the code. The Stakeholder license only gives access to:
- View team dashboards and portfolio backlogs
- View, add, and modify items on the backlog
- View, create, and modify work items such as stories, features, and bugs
- View, create, and save queries
- Create and receive alerts when changes are made to work items
- Submit, view, and change your feedback responses.
For people to see the code, they will at least need a Basic license. If you then want to restrict their access, you can do so by creating a TFS Group and setting the correct permissions. In this case, you want to limit the Code permissions to only Read so they can't modify the code.
See Permission reference for Team Foundation Server for more information.
This means there is no free way to allow users to read your code. You do start with 5 free basic licenses however, so if that's enough you can assign those to your users.