It is possible to read and write text files from Sonic Pi. I have done two projects which utilise this.
and more recently
The latter uses a json file format.
The links give full articles including links to the software code.
EDIT
Alternatively If you don’t need to store the integers permanently you can use a python osc client to send integer data to Sonic Pi, which again I have done in several projects. eg see this article