There seem to be two different questions here: "How do I save an .rds file" and "How do I save my data as a SQLite database". Taking those in turn:
How do I save my data as an rds file?
saveRDS(data, 'myfilename.rds')
How do I save my data as a SQLite database?
What is wrong with the code you have? Provided your call to dbWriteTable works successfully, you could then close your R session and use the following code to to get your data dataframe back:
library(RSQLite)
con <- dbConnect(SQLite(), dbname = 'ShearTest3.sqlite')
data <- dbGetQuery(con, 'select * from sh3;')