You can use a cron job.
Cron is used when you want to schedule jobs to run at specific times, e.g. every hour, every Sunday at 3 a.m. It stores the details in a table for each user called a crontab which is read during boot.
One of the "times" you can specify is at a reboot.
To list your crontab use the command
crontab -l
To edit/create your crontab use the command
crontab -e
On occasion you might want to run a script as root in which case precede the previous two commands with sudo.
Use the following commands for help
man cron
man -5 crontab
In your case you need a simple job like I use to mount a NFS disk at boot. My crontab contains the following:
@reboot (sleep 60; /bin/mount /code)&
You need to use crontab -e and add the following to your crontab
@reboot /home/pi/script
where /home/pi/script is the full path to the script you want to run.
bashrc
is a configuration file for the bash shell, which means it gets called every time a bash terminal is started.