Shared Writing in Literacy is something everyone has done often using a whiteboard and having the teacher lead the writing with pupils suggesting what to write. This can be done in a variety of ways with varying degrees of success.
I have recently had a go at using Chromebooks and a shared document to do a shared write and found it worked really well with pupils staying focused and engaged throughout.
I started by creating a blank shared document and loading it up on the TV screen at the front of the class (can easily use a whiteboard if that is what you have). I then put a Chromebook (again could use any device but Chromebooks work really well) on each table and posted the link to the shared document on Google Classroom. Another way would be to login in a device on each table and open up the shared document before the lesson if you wanted to avoid this being done during the lesson.
After introducing the shared writing, I would ask one table (usually the more able) to write the first sentence, then the next table would write the next sentence and so on. As more sentences were being written I encouraged the other tables to edit/improve what had been written. This I did by assigning a role to each table.
One table would correct mistakes, spelling, punctuation, capital letters etc
One table would try to up level the writing by including adventurous vocabulary.
One table would add in adjectives or adverbs etc
One table would look at connectives and sentence structure
You probably get the idea now, and it can be structured to whatever suits your class.
I would keep rotating the tables writing a sentence. After a few minutes and with clear roles, the shred write would run itself. At the end of the time we would read the writing out and bingo you have a high quality shared write.
If you wanted to take this further, with the link on Google Classroom pupils could access and add/edit the writing after the lesson in their own time.